aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ld
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2014-12-17 12:13:47 -0500
committerAustin Clements <austin@google.com>2014-12-22 22:47:05 +0000
commit326ceeabc46db98cccfbde80fde562c0fb3325c3 (patch)
tree1ce2402dc28583e057bf767d33616708f98129ed /src/cmd/ld
parent6c78443b3e13c43ea887f6b73099e0c1297327c5 (diff)
downloadgo-326ceeabc46db98cccfbde80fde562c0fb3325c3.tar.xz
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>
Diffstat (limited to 'src/cmd/ld')
-rw-r--r--src/cmd/ld/lib.h1
-rw-r--r--src/cmd/ld/pobj.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/ld/lib.h b/src/cmd/ld/lib.h
index 067ffa0bcc..17483e0b4c 100644
--- a/src/cmd/ld/lib.h
+++ b/src/cmd/ld/lib.h
@@ -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);
diff --git a/src/cmd/ld/pobj.c b/src/cmd/ld/pobj.c
index 63460df30a..b86ddfe0fe 100644
--- a/src/cmd/ld/pobj.c
+++ b/src/cmd/ld/pobj.c
@@ -184,6 +184,7 @@ main(int argc, char *argv[])
if(HEADTYPE == Hwindows)
dope();
addexport();
+ gentext(); // trampolines, call stubs, etc.
textaddress();
pclntab();
symtab();