mirror of https://github.com/golang/go.git
cmd/ld: add a text generation pass
This will be used by ppc64 to add call stubs to the .text section. ARM needs a similar pass to generate veneers for arm->thumb transitions. Change-Id: Iaee74036e60643a56fab15b564718f359c5910eb Reviewed-on: https://go-review.googlesource.com/2004 Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
6c78443b3e
commit
326ceeabc4
|
|
@ -69,6 +69,11 @@ static void addpltsym(Link*, LSym*);
|
|||
static void addgotsym(Link*, LSym*);
|
||||
static void addgotsyminternal(Link*, LSym*);
|
||||
|
||||
void
|
||||
gentext(void)
|
||||
{
|
||||
}
|
||||
|
||||
// Preserve highest 8 bits of a, and do addition to lower 24-bit
|
||||
// of a and b; used to adjust ARM branch intruction's target
|
||||
static int32
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ int nelfsym = 1;
|
|||
static void addpltsym(LSym*);
|
||||
static void addgotsym(LSym*);
|
||||
|
||||
void
|
||||
gentext(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
adddynrela(LSym *rela, LSym *s, Reloc *r)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ int nelfsym = 1;
|
|||
static void addpltsym(Link*, LSym*);
|
||||
static void addgotsym(Link*, LSym*);
|
||||
|
||||
void
|
||||
gentext(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
adddynrela(LSym *rela, LSym *s, Reloc *r)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ needlib(char *name)
|
|||
|
||||
int nelfsym = 1;
|
||||
|
||||
void
|
||||
gentext(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
adddynrela(LSym *rel, LSym *s, Reloc *r)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ vlong entryvalue(void);
|
|||
void errorexit(void);
|
||||
void follow(void);
|
||||
void genasmsym(void (*put)(LSym*, char*, int, vlong, vlong, int, LSym*));
|
||||
void gentext(void);
|
||||
void growdatsize(vlong *datsizep, LSym *s);
|
||||
char* headstr(int v);
|
||||
int headtype(char *name);
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ main(int argc, char *argv[])
|
|||
if(HEADTYPE == Hwindows)
|
||||
dope();
|
||||
addexport();
|
||||
gentext(); // trampolines, call stubs, etc.
|
||||
textaddress();
|
||||
pclntab();
|
||||
symtab();
|
||||
|
|
|
|||
Loading…
Reference in New Issue