PATCH: Fix ld for ELF/PPC

H. J. Lu hjl@lucon.org
Sun Sep 29 18:38:00 GMT 2002
On Sun, Sep 29, 2002 at 10:41:26AM -0400, Jack Howarth wrote:
> HJ,
>    I tried one other variation on the original hesiod srpm patches.
> I replaced the -G in the ld command in the hesiod-3.0.2-shlib.patch
> with a -shared. I see the same problem as with -G and the same
> readelf -d output.
>                                           Jack

I checked in the following patch to fix it.


H.J.
-------------- next part --------------
2002-09-29  H.J. Lu <hjl@gnu.org>

	* ld/emulparams/elf32ppc.sh (OTHER_GOT_RELOC_SECTIONS): New.
	* ld/emulparams/elf32ppclinux.sh (OTHER_GOT_RELOC_SECTIONS): New.

--- ld/emulparams/elf32ppc.sh.got2	Sun Sep 29 15:32:24 2002
+++ ld/emulparams/elf32ppc.sh	Sun Sep 29 16:57:00 2002
@@ -17,6 +17,10 @@ OTHER_READWRITE_SECTIONS="
   .got1         ${RELOCATING-0} : { *(.got1) }
   .got2         ${RELOCATING-0} : { *(.got2) }
 "
+OTHER_GOT_RELOC_SECTIONS="
+  .rela.got1         ${RELOCATING-0} : { *(.rela.got1) }
+  .rela.got2         ${RELOCATING-0} : { *(.rela.got2) }
+"
 
 # Treat a host that matches the target with the possible exception of "64"
 # in the name as if it were native.
--- ld/emulparams/elf32ppclinux.sh.got2	Thu Nov 29 00:26:55 2001
+++ ld/emulparams/elf32ppclinux.sh	Sun Sep 29 16:57:38 2002
@@ -6,3 +6,6 @@ test -z "${RELOCATING}" || OTHER_SECTION
 OTHER_READWRITE_SECTIONS="
   .got1         ${RELOCATING-0} : { *(.got1) }
   .got2         ${RELOCATING-0} : { *(.got2) }"
+OTHER_GOT_RELOC_SECTIONS="
+  .rela.got1         ${RELOCATING-0} : { *(.rela.got1) }
+  .rela.got2         ${RELOCATING-0} : { *(.rela.got2) }"


More information about the Binutils mailing list