ia64vms.sc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. # Linker script for Itanium VMS systems.
  2. # Tristan Gingold <gingold@adacore.com>.
  3. #
  4. # Copyright (C) 2014-2022 Free Software Foundation, Inc.
  5. #
  6. # Copying and distribution of this file, with or without modification,
  7. # are permitted in any medium without royalty provided the copyright
  8. # notice and this notice are preserved.
  9. # Using an empty script for ld -r is better than mashing together
  10. # sections. This hack likely leaves ld -Ur broken.
  11. test -n "${RELOCATING}" || exit 0
  12. PAGESIZE=0x10000
  13. BLOCKSIZE=0x200
  14. cat <<EOF
  15. /* Copyright (C) 2014-2022 Free Software Foundation, Inc.
  16. Copying and distribution of this script, with or without modification,
  17. are permitted in any medium without royalty provided the copyright
  18. notice and this notice are preserved. */
  19. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  20. ${LIB_SEARCH_DIRS}
  21. ENTRY(__entry)
  22. SECTIONS
  23. {
  24. /* RW segment. */
  25. ${RELOCATING+. = ${PAGESIZE};}
  26. \$DATA\$ ALIGN (${BLOCKSIZE}) : {
  27. *(\$DATA\$ .data .data.*)
  28. *(\$BSS\$ .bss .bss.*)
  29. }
  30. /* Code segment. Note: name must be \$CODE\$ */
  31. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  32. \$CODE\$ ALIGN (${BLOCKSIZE}) : {
  33. *(\$CODE\$ .text .text.*)
  34. }
  35. .plt ALIGN (8) : {
  36. *(.plt)
  37. }
  38. /* RO segment. */
  39. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  40. /* RO initialized data. */
  41. \$LITERAL\$ ALIGN (${BLOCKSIZE}) : {
  42. *(\$LITERAL\$)
  43. *(\$READONLY\$ .rodata .rodata.*)
  44. *(.jcr)
  45. *(.ctors)
  46. *(.dtors)
  47. *(.opd)
  48. *(.gcc_except_table)
  49. /* LIB$INITIALIZE stuff. */
  50. *(LIB\$INITIALIZDZ) /* Start marker. */
  51. *(LIB\$INITIALIZD_) /* Hi priority. */
  52. *(LIB\$INITIALIZE) /* User. */
  53. *(LIB\$INITIALIZE$) /* End marker. */
  54. }
  55. /* Short segment. */
  56. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  57. .srodata : {
  58. *(.srodata .srodata.*)
  59. }
  60. .got ALIGN (8) : {
  61. *(.got)
  62. }
  63. .IA_64.pltoff ALIGN (16) : {
  64. *(.IA_64.pltoff)
  65. }
  66. \$TFR\$ ALIGN (16) : {
  67. /* Transfer vector. */
  68. __entry = .;
  69. *(.transfer)
  70. }
  71. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  72. \$RW_SHORT\$ ALIGN (${BLOCKSIZE}) : {
  73. *(.sdata .sdata.*)
  74. *(.sbss .sbss.*)
  75. }
  76. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  77. .IA_64.unwind ALIGN (${BLOCKSIZE}) : {
  78. *(.IA_64.unwind .IA_64.unwind.*)
  79. }
  80. .IA_64.unwind_info ALIGN (8) : {
  81. *(.IA_64.unwind_info .IA_64.unwind_info.*)
  82. }
  83. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  84. .dynamic /* \$DYNAMIC\$ */ ALIGN (${BLOCKSIZE}) : {
  85. *(.dynamic)
  86. *(.vmsdynstr)
  87. *(.fixups)
  88. }
  89. ${RELOCATING+. = ALIGN (${PAGESIZE});}
  90. .dynstr : { *(.dynstr) }
  91. .dynsym ${RELOCATING-0} : { *(.dynsym) }
  92. .rela.got : { *(.rela.got) }
  93. .got.plt : { *(.got.plt) }
  94. .gnu.version_d : { *(.gnu.version_d) }
  95. .gnu.version : { *(.gnu.version) }
  96. .gnu.version_r : { *(.gnu.version_r) }
  97. .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }
  98. EOF
  99. . $srcdir/scripttempl/DWARF.sc
  100. cat <<EOF
  101. .note : { *(.vms.note) }
  102. /DISCARD/ : { *(.note) *(.vms_display_name_info) }
  103. }
  104. EOF