merge from gcc
[binutils.git] / ld / emulparams / elf32ppc.sh
blobad6876dd4fb1fa70e928bdcf16feec4d35f1f4a1
1 # If you change this file, please also look at files which source this one:
2 # elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh elf32ppcvxworks.sh
4 TEMPLATE_NAME=elf32
5 EXTRA_EM_FILE=ppc32elf
6 GENERATE_SHLIB_SCRIPT=yes
7 GENERATE_PIE_SCRIPT=yes
8 SCRIPT_NAME=elf
9 OUTPUT_FORMAT="elf32-powerpc"
10 TEXT_START_ADDR=0x01800000
11 MAXPAGESIZE=0x10000
12 COMMONPAGESIZE=0x1000
13 ARCH=powerpc:common
14 MACHINE=
15 # Yes, we want duplicate .got and .plt sections. The linker chooses the
16 # appropriate one magically in ppc_after_open
17 DATA_GOT=
18 SDATA_GOT=
19 SEPARATE_GOTPLT=0
20 BSS_PLT=
21 GOT=".got ${RELOCATING-0} : SPECIAL { *(.got) }"
22 PLT=".plt ${RELOCATING-0} : SPECIAL { *(.plt) }"
23 GOTPLT="${PLT}"
24 OTHER_TEXT_SECTIONS="*(.glink)"
25 EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
26 if test -z "${CREATE_SHLIB}"; then
27 SDATA_START_SYMBOLS="PROVIDE (_SDA_BASE_ = 32768);"
28 SDATA2_START_SYMBOLS="PROVIDE (_SDA2_BASE_ = 32768);"
29 SBSS_START_SYMBOLS="PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);"
30 SBSS_END_SYMBOLS="PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);"
31 else
32 unset SDATA_START_SYMBOLS
33 unset SDATA2_START_SYMBOLS
34 unset SBSS_START_SYMBOLS
35 unset SBSS_END_SYMBOLS
37 OTHER_END_SYMBOLS="__end = .;"
38 OTHER_RELRO_SECTIONS="
39 .fixup ${RELOCATING-0} : { *(.fixup) }
40 .got1 ${RELOCATING-0} : { *(.got1) }
41 .got2 ${RELOCATING-0} : { *(.got2) }
43 OTHER_GOT_RELOC_SECTIONS="
44 .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
45 .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
48 # Treat a host that matches the target with the possible exception of "64"
49 # in the name as if it were native.
50 if test `echo "$host" | sed -e s/64//` = `echo "$target" | sed -e s/64//`; then
51 case " $EMULATION_LIBPATH " in
52 *" ${EMULATION_NAME} "*)
53 NATIVE=yes
55 esac
58 # Look for 64 bit target libraries in /lib64, /usr/lib64 etc., first.
59 case "$EMULATION_NAME" in
60 *64*) LIBPATH_SUFFIX=64 ;;
61 esac