]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: add a text generation pass
authorAustin Clements <austin@google.com>
Wed, 17 Dec 2014 17:13:47 +0000 (12:13 -0500)
committerAustin Clements <austin@google.com>
Mon, 22 Dec 2014 22:47:05 +0000 (22:47 +0000)
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>
src/cmd/5l/asm.c
src/cmd/6l/asm.c
src/cmd/8l/asm.c
src/cmd/9l/asm.c
src/cmd/ld/lib.h
src/cmd/ld/pobj.c

index 9c1c04e2d4db59ce43a406c10e3385e4ace538b1..017d3f4357fd4d2d7e352f7946716a754a9ea79b 100644 (file)
@@ -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
index 18b5aa31198121ab4f0f18c3e8e4302b6f47e174..41c9cc84c64bf0fe0efdb9c8cc044853b3c8c28f 100644 (file)
@@ -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)
 {
index 98c04240374fd4f70171d18eaff226af1b504da6..8b91c0971a28a14a178b8497eed3dd57b5a5dac4 100644 (file)
@@ -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)
 {
index f9e2810ade6ca9dc40d26cc98da46c860b6712d8..7814edd525e2f0c5c737694bc267aa3c0da1c3a0 100644 (file)
@@ -65,6 +65,11 @@ needlib(char *name)
 
 int    nelfsym = 1;
 
+void
+gentext(void)
+{
+}
+
 void
 adddynrela(LSym *rel, LSym *s, Reloc *r)
 {
index 067ffa0bcc4f8a260deff0346a22d35e3e8ff040..17483e0b4c95e26064953a63c05ed449948426e6 100644 (file)
@@ -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);
index 63460df30afa9ecbaa85202d73e6f1d13058a16c..b86ddfe0fe3d92373557822806586cf0eb3ce864 100644 (file)
@@ -184,6 +184,7 @@ main(int argc, char *argv[])
        if(HEADTYPE == Hwindows)
                dope();
        addexport();
+       gentext();              // trampolines, call stubs, etc.
        textaddress();
        pclntab();
        symtab();