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