alpha.sc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Linker script for Alpha systems.
  2. # Ian Lance Taylor <ian@cygnus.com>.
  3. # These variables may be overridden by the emulation file. The
  4. # defaults are appropriate for an Alpha running OSF/1.
  5. #
  6. # Copyright (C) 2014-2022 Free Software Foundation, Inc.
  7. #
  8. # Copying and distribution of this file, with or without modification,
  9. # are permitted in any medium without royalty provided the copyright
  10. # notice and this notice are preserved.
  11. test -z "$ENTRY" && ENTRY=__start
  12. test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x120000000 + SIZEOF_HEADERS"
  13. if test "x$LD_FLAG" = "xn" -o "x$LD_FLAG" = "xN"; then
  14. DATA_ADDR=.
  15. else
  16. test -z "$DATA_ADDR" && DATA_ADDR=0x140000000
  17. fi
  18. cat <<EOF
  19. /* Copyright (C) 2014-2022 Free Software Foundation, Inc.
  20. Copying and distribution of this script, with or without modification,
  21. are permitted in any medium without royalty provided the copyright
  22. notice and this notice are preserved. */
  23. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  24. ${LIB_SEARCH_DIRS}
  25. ${RELOCATING+ENTRY (${ENTRY})}
  26. SECTIONS
  27. {
  28. ${RELOCATING+. = ${TEXT_START_ADDR};}
  29. .text : {
  30. ${RELOCATING+ _ftext = .;}
  31. ${RELOCATING+ __istart = .;}
  32. ${RELOCATING+ KEEP (*(SORT_NONE(.init)))}
  33. ${RELOCATING+ LONG (0x6bfa8001)}
  34. ${RELOCATING+ eprol = .;}
  35. *(.text)
  36. ${RELOCATING+ __fstart = .;}
  37. ${RELOCATING+ KEEP (*(SORT_NONE(.fini)))}
  38. ${RELOCATING+ LONG (0x6bfa8001)}
  39. ${RELOCATING+ _etext = .;}
  40. }
  41. .rdata : {
  42. *(.rdata)
  43. }
  44. .rconst : {
  45. *(.rconst)
  46. }
  47. .pdata : {
  48. ${RELOCATING+ _fpdata = .;}
  49. *(.pdata)
  50. }
  51. ${RELOCATING+. = ${DATA_ADDR};}
  52. .data : {
  53. ${RELOCATING+ _fdata = .;}
  54. *(.data)
  55. ${CONSTRUCTING+CONSTRUCTORS}
  56. }
  57. .xdata : {
  58. *(.xdata)
  59. }
  60. ${RELOCATING+ _gp = ALIGN (16) + 0x8000;}
  61. .lit8 : {
  62. *(.lit8)
  63. }
  64. .lita : {
  65. *(.lita)
  66. }
  67. .sdata : {
  68. *(.sdata)
  69. }
  70. ${RELOCATING+ _EDATA = .;}
  71. ${RELOCATING+ _FBSS = .;}
  72. .sbss : {
  73. *(.sbss)
  74. ${RELOCATING+*(.scommon)}
  75. }
  76. .bss : {
  77. *(.bss)
  78. ${RELOCATING+*(COMMON)}
  79. }
  80. ${RELOCATING+ _end = .;}
  81. }
  82. EOF