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