From 0dfb79fe88a5811c679ae5caa8345e099c620ceb Mon Sep 17 00:00:00 2001 From: François Revol Date: Sun, 19 Apr 2015 17:23:50 +0200 Subject: [PATCH] binutils: fix PPC GOT issue Simplify haiku-specific ppc emulation script, and reuse common code, which seems to fix the linker issue mentioned in #10240: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got --- binutils/ld/Makefile.am | 5 ++++- binutils/ld/Makefile.in | 5 ++++- binutils/ld/emulparams/elf32ppchaiku.sh | 18 +++--------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/binutils/ld/Makefile.am b/binutils/ld/Makefile.am index d80fbf8..63747b2 100644 --- a/binutils/ld/Makefile.am +++ b/binutils/ld/Makefile.am @@ -1193,7 +1193,10 @@ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} eelf32ppchaiku.c: $(srcdir)/emulparams/elf32ppchaiku.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ + $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \ + ldemul-list.h \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ diff --git a/binutils/ld/Makefile.in b/binutils/ld/Makefile.in index 5dc5c02..06744c9 100644 --- a/binutils/ld/Makefile.in +++ b/binutils/ld/Makefile.in @@ -2634,7 +2634,10 @@ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} eelf32ppchaiku.c: $(srcdir)/emulparams/elf32ppchaiku.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ + $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \ + ldemul-list.h \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \ $(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \ diff --git a/binutils/ld/emulparams/elf32ppchaiku.sh b/binutils/ld/emulparams/elf32ppchaiku.sh index 5a65cd4..976880c 100644 --- a/binutils/ld/emulparams/elf32ppchaiku.sh +++ b/binutils/ld/emulparams/elf32ppchaiku.sh @@ -1,20 +1,6 @@ -SCRIPT_NAME=elf -OUTPUT_FORMAT="elf32-powerpc" +. ${srcdir}/emulparams/elf32ppc.sh TEXT_START_ADDR=0x200000 -NONPAGED_TEXT_START_ADDR=0x200000 MAXPAGESIZE=0x1000 -ARCH=powerpc -MACHINE= -NOP=0x60000000 -TEMPLATE_NAME=elf32 GENERATE_SHLIB_SCRIPT=yes BSS_PLT= -OTHER_RELRO_SECTIONS=" - .fixup ${RELOCATING-0} : { *(.fixup) } - .got1 ${RELOCATING-0} : { *(.got1) } - .got2 ${RELOCATING-0} : { *(.got2) } -" -OTHER_GOT_RELOC_SECTIONS=" - .rela.got1 ${RELOCATING-0} : { *(.rela.got1) } - .rela.got2 ${RELOCATING-0} : { *(.rela.got2) } -" +LIBPATH_SUFFIX= -- gitore 0.2.2