This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: multiple GOT sections for powerpc64
On Mon, Jul 28, 2003 at 12:14:42PM +0930, Alan Modra wrote:
> * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r.
Bah, that fell foul to parameter expansion rules regarding matching
braces.
* emulparams/elf64ppc.sh (GOT): Fix for shell brace matching.
Index: ld/emulparams/elf64ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ppc.sh,v
retrieving revision 1.15
diff -u -p -r1.15 elf64ppc.sh
--- ld/emulparams/elf64ppc.sh 28 Jul 2003 02:42:37 -0000 1.15
+++ ld/emulparams/elf64ppc.sh 28 Jul 2003 03:31:15 -0000
@@ -18,9 +18,15 @@ OTHER_BSS_SYMBOLS="
.tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
OTHER_PLT_RELOC_SECTIONS="
.rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }"
-GOT="
- .got ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.got${RELOCATING+ .toc}) }
- ${RELOCATING-.toc 0 : { *(.toc) }}"
+
+if test x${RELOCATING+set} = xset; then
+ GOT="
+ .got ALIGN(8) : { *(.got .toc) }"
+else
+ GOT="
+ .got 0 : { *(.got) }
+ .toc 0 : { *(.toc) }"
+fi
OTHER_GOT_RELOC_SECTIONS="
.rela.toc ${RELOCATING-0} : { *(.rela.toc) }"
OTHER_READWRITE_SECTIONS="
--
Alan Modra
IBM OzLabs - Linux Technology Centre