elf64ppc.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. source_sh ${srcdir}/emulparams/elf32ppccommon.sh
  2. source_sh ${srcdir}/emulparams/plt_unwind.sh
  3. source_sh ${srcdir}/emulparams/dt-relr.sh
  4. EXTRA_EM_FILE=ppc64elf
  5. ELFSIZE=64
  6. OUTPUT_FORMAT="elf64-powerpc"
  7. TEXT_START_ADDR=0x10000000
  8. #SEGMENT_SIZE=0x10000000
  9. ARCH=powerpc:common64
  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. if test x${RELOCATING+set} = xset; then
  21. GOT="
  22. .got : ALIGN(256) { *(.got .toc) }"
  23. else
  24. GOT="
  25. .got 0 : { *(.got) }
  26. .toc 0 : { *(.toc) }"
  27. fi
  28. # Put .opd relocs first so ld.so will process them before any ifunc relocs.
  29. INITIAL_RELOC_SECTIONS="
  30. .rela.opd ${RELOCATING-0} : { *(.rela.opd) }"
  31. OTHER_GOT_RELOC_SECTIONS="
  32. .rela.toc ${RELOCATING-0} : { *(.rela.toc) }
  33. .rela.toc1 ${RELOCATING-0} : { *(.rela.toc1) }
  34. .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }
  35. .rela.branch_lt ${RELOCATING-0} : { *(.rela.branch_lt) }"
  36. OTHER_RELRO_SECTIONS_2="
  37. .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
  38. .toc1 ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc1) }
  39. .branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
  40. INITIAL_READWRITE_SECTIONS="
  41. .toc ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.toc) }"
  42. # Put .got before .data
  43. DATA_GOT=" "
  44. # Always make .got read-only after relocation
  45. SEPARATE_GOTPLT=0
  46. # Also put .sdata before .data
  47. DATA_SDATA=" "
  48. # and .plt/.iplt before .data
  49. DATA_PLT=
  50. PLT_BEFORE_GOT=" "