aout.sc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright (C) 2014-2022 Free Software Foundation, Inc.
  2. #
  3. # Copying and distribution of this file, with or without modification,
  4. # are permitted in any medium without royalty provided the copyright
  5. # notice and this notice are preserved.
  6. #
  7. test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
  8. test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
  9. test -z "${ALIGNMENT}" && ALIGNMENT="4"
  10. cat <<EOF
  11. /* Copyright (C) 2014-2022 Free Software Foundation, Inc.
  12. Copying and distribution of this script, with or without modification,
  13. are permitted in any medium without royalty provided the copyright
  14. notice and this notice are preserved. */
  15. OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
  16. "${LITTLE_OUTPUT_FORMAT}")
  17. OUTPUT_ARCH(${ARCH})
  18. ${RELOCATING+${LIB_SEARCH_DIRS}}
  19. ${STACKZERO+${RELOCATING+${STACKZERO}}}
  20. ${SHLIB_PATH+${RELOCATING+${SHLIB_PATH}}}
  21. ${RELOCATING+${EXECUTABLE_SYMBOLS}}
  22. ${RELOCATING+PROVIDE (__stack = 0);}
  23. SECTIONS
  24. {
  25. ${RELOCATING+. = ${TEXT_START_ADDR};}
  26. .text :
  27. {
  28. CREATE_OBJECT_SYMBOLS
  29. *(.text)
  30. /* The next six sections are for SunOS dynamic linking. The order
  31. is important. */
  32. *(.dynrel)
  33. *(.hash)
  34. *(.dynsym)
  35. *(.dynstr)
  36. *(.rules)
  37. *(.need)
  38. ${RELOCATING+_etext = .;}
  39. ${RELOCATING+__etext = .;}
  40. ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
  41. }
  42. ${RELOCATING+. = ${DATA_ALIGNMENT};}
  43. .data :
  44. {
  45. /* The first three sections are for SunOS dynamic linking. */
  46. *(.dynamic)
  47. *(.got)
  48. *(.plt)
  49. *(.data)
  50. *(.linux-dynamic) /* For Linux dynamic linking. */
  51. ${CONSTRUCTING+CONSTRUCTORS}
  52. ${RELOCATING+_edata = .;}
  53. ${RELOCATING+__edata = .;}
  54. }
  55. .bss :
  56. {
  57. ${RELOCATING+ __bss_start = .};
  58. *(.bss)
  59. *(COMMON)
  60. ${RELOCATING+. = ALIGN(${ALIGNMENT});}
  61. ${RELOCATING+_end = . };
  62. ${RELOCATING+__end = . };
  63. }
  64. }
  65. EOF