pdp11.sc 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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="2"
  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. ${RELOCATING+_etext = .;}
  31. ${RELOCATING+__etext = .;}
  32. ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
  33. }
  34. ${RELOCATING+. = ${DATA_SEG_ADDR};}
  35. .data :
  36. {
  37. *(.data)
  38. ${CONSTRUCTING+CONSTRUCTORS}
  39. ${RELOCATING+_edata = .;}
  40. ${RELOCATING+__edata = .;}
  41. }
  42. .bss :
  43. {
  44. ${RELOCATING+ __bss_start = .};
  45. *(.bss)
  46. *(COMMON)
  47. ${RELOCATING+. = ALIGN(${ALIGNMENT});}
  48. ${RELOCATING+_end = . };
  49. ${RELOCATING+__end = . };
  50. }
  51. }
  52. EOF