0dd42cf4323d66cd1e6f8964b48f81eb50bd746a
[external/binutils.git] / ld / emulparams / elf64ppc.sh
1 source_sh ${srcdir}/emulparams/elf32ppccommon.sh
2 source_sh ${srcdir}/emulparams/plt_unwind.sh
3 EXTRA_EM_FILE=ppc64elf
4 ELFSIZE=64
5 OUTPUT_FORMAT="elf64-powerpc"
6 TEXT_START_ADDR=0x10000000
7 #SEGMENT_SIZE=0x10000000
8 ARCH=powerpc:common64
9 NOP=0x60000000
10 unset EXECUTABLE_SYMBOLS
11 unset SDATA_START_SYMBOLS
12 unset SDATA2_START_SYMBOLS
13 unset SBSS_START_SYMBOLS
14 unset SBSS_END_SYMBOLS
15 unset OTHER_END_SYMBOLS
16 unset OTHER_RELRO_SECTIONS
17 OTHER_TEXT_SECTIONS="*(.sfpr .glink)"
18 OTHER_SDATA_SECTIONS="
19   .tocbss       ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.tocbss)}"
20
21 if test x${RELOCATING+set} = xset; then
22   GOT="
23   .got          : ALIGN(256) { *(.got .toc) }"
24 else
25   GOT="
26   .got          0 : { *(.got) }
27   .toc          0 : { *(.toc) }"
28 fi
29 # Put .opd relocs first so ld.so will process them before any ifunc relocs.
30 INITIAL_RELOC_SECTIONS="
31   .rela.opd     ${RELOCATING-0} : { *(.rela.opd) }"
32 OTHER_GOT_RELOC_SECTIONS="
33   .rela.toc     ${RELOCATING-0} : { *(.rela.toc) }
34   .rela.toc1    ${RELOCATING-0} : { *(.rela.toc1) }
35   .rela.tocbss  ${RELOCATING-0} : { *(.rela.tocbss) }
36   .rela.branch_lt       ${RELOCATING-0} : { *(.rela.branch_lt) }"
37 OTHER_RELRO_SECTIONS_2="
38   .opd          ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
39   .toc1         ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
40   .branch_lt    ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
41 INITIAL_READWRITE_SECTIONS="
42   .toc          ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc) }"
43 # Put .got before .data
44 DATA_GOT=" "
45 # Always make .got read-only after relocation
46 SEPARATE_GOTPLT=0
47 # Also put .sdata before .data
48 DATA_SDATA=" "
49 # and .plt/.iplt before .data
50 DATA_PLT=
51 PLT_BEFORE_GOT=" "