summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/ld/emulparams/elf64ppc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/ld/emulparams/elf64ppc.sh')
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh28
1 files changed, 25 insertions, 3 deletions
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
index 2169862..e3a8177 100644
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -5,8 +5,10 @@ GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf64-powerpc"
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-ARCH=powerpc
+DATA_ADDR="ALIGN (0x10000000) + (. & (${MAXPAGESIZE} - 1))"
+MAXPAGESIZE=0x10000
+COMMONPAGESIZE=0x1000
+ARCH=powerpc:common64
MACHINE=
NOP=0x60000000
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
@@ -15,6 +17,7 @@ CTOR_START='PROVIDE (__CTOR_LIST__ = .); PROVIDE (___CTOR_LIST__ = .);'
CTOR_END='PROVIDE (__CTOR_END__ = .); PROVIDE (___CTOR_END__ = .);'
DTOR_START='PROVIDE (__DTOR_LIST__ = .); PROVIDE (___DTOR_LIST__ = .);'
DTOR_END='PROVIDE (__DTOR_END__ = .); PROVIDE (___DTOR_END__ = .);'
+OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
BSS_PLT=
OTHER_BSS_SYMBOLS="
.tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
@@ -26,4 +29,23 @@ OTHER_GOT_RELOC_SECTIONS="
.rela.toc ${RELOCATING-0} : { *(.rela.toc) }"
OTHER_READWRITE_SECTIONS="
.toc1 ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc1) }
- .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.opd) }"
+ .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { KEEP (*(.opd)) }"
+
+# Treat a host that matches the target with the possible exception of "64"
+# in the name as if it were native.
+if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
+ case " $EMULATION_LIBPATH " in
+ *" ${EMULATION_NAME} "*)
+ LIB_PATH=${libdir}
+ for lib in ${NATIVE_LIB_DIRS}; do
+ case :${LIB_PATH}: in
+ *:${lib}:*) ;;
+ *) LIB_PATH=${LIB_PATH}:${lib} ;;
+ esac
+ done
+ # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
+ case "$EMULATION_NAME" in
+ *64*) LIB_PATH=`echo ${LIB_PATH}: | sed -e s,:,64:,g`$LIB_PATH
+ esac
+ esac
+fi
OpenPOWER on IntegriCloud