1# The PLT-agnostic parts of a generic 32-bit ELF PowerPC target. Included by: 2# elf32ppc.sh elf32ppcvxworks.sh elf64ppc.sh 3TEMPLATE_NAME=elf32 4GENERATE_SHLIB_SCRIPT=yes 5GENERATE_PIE_SCRIPT=yes 6SCRIPT_NAME=elf 7OUTPUT_FORMAT="elf32-powerpc" 8NO_REL_RELOCS=yes 9TEXT_START_ADDR=0x01800000 10MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 11COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" 12ARCH=powerpc:common 13MACHINE= 14EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' 15if test -z "${CREATE_SHLIB}"; then 16 SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);" 17 SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);" 18else 19 unset SDATA_START_SYMBOLS 20 unset SDATA2_START_SYMBOLS 21 unset SBSS_START_SYMBOLS 22 unset SBSS_END_SYMBOLS 23fi 24OTHER_END_SYMBOLS="__end = .;" 25OTHER_RELRO_SECTIONS=" 26 .fixup ${RELOCATING-0} : { *(.fixup) } 27 .got1 ${RELOCATING-0} : { *(.got1) } 28 .got2 ${RELOCATING-0} : { *(.got2) } 29" 30OTHER_GOT_RELOC_SECTIONS=" 31 .rela.got1 ${RELOCATING-0} : { *(.rela.got1) } 32 .rela.got2 ${RELOCATING-0} : { *(.rela.got2) } 33" 34 35# Treat a host that matches the target with the possible exception of "64" 36# in the name as if it were native. 37if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then 38 case " $EMULATION_LIBPATH " in 39 *" ${EMULATION_NAME} "*) 40 NATIVE=yes 41 ;; 42 esac 43fi 44 45# Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first. 46# Similarly, look for 32 bit libraries in /lib32, /usr/lib32 etc. 47case "$host":"$EMULATION_NAME" in 48 *le-*:*64lppc*) LIBPATH_SUFFIX=64 ;; 49 *le-*:*32lppc*) LIBPATH_SUFFIX=32 ;; 50 *le-*:*64*) LIBPATH_SUFFIX=64be ;; 51 *le-*:*32*) LIBPATH_SUFFIX=32be ;; 52 *:*64lppc*) LIBPATH_SUFFIX=64le ;; 53 *:*32lppc*) LIBPATH_SUFFIX=32le ;; 54 *:*64*) LIBPATH_SUFFIX=64 ;; 55 *:*32*) LIBPATH_SUFFIX=32 ;; 56esac 57