h8500.sc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Copyright (C) 2014-2015 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. TORS="
  7. ___ctors = . ;
  8. *(.ctors)
  9. ___ctors_end = . ;
  10. ___dtors = . ;
  11. *(.dtors)
  12. ___dtors_end = . ;"
  13. cat <<EOF
  14. /* Copyright (C) 2014-2015 Free Software Foundation, Inc.
  15. Copying and distribution of this script, with or without modification,
  16. are permitted in any medium without royalty provided the copyright
  17. notice and this notice are preserved. */
  18. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  19. OUTPUT_ARCH(${ARCH})
  20. /* Code and data 64k total */
  21. SECTIONS
  22. {
  23. .text ${RELOCATING+ 0x0000} :
  24. {
  25. *(.text)
  26. ${RELOCATING+ _etext = . ; }
  27. }
  28. .data ${RELOCATING+ . } :
  29. {
  30. *(.data)
  31. ${RELOCATING+ _edata = . ; }
  32. }
  33. .rdata ${RELOCATING+ . } :
  34. {
  35. *(.rdata);
  36. *(.strings)
  37. ${CONSTRUCTING+${TORS}}
  38. }
  39. .bss ${RELOCATING+ . } :
  40. {
  41. ${RELOCATING+ __start_bss = . ; }
  42. *(.bss)
  43. *(COMMON)
  44. ${RELOCATING+ _end = . ; }
  45. }
  46. .stack ${RELOCATING+ 0xfff0} :
  47. {
  48. ${RELOCATING+ _stack = . ; }
  49. *(.stack)
  50. }
  51. .stab 0 ${RELOCATING+(NOLOAD)} :
  52. {
  53. [ .stab ]
  54. }
  55. .stabstr 0 ${RELOCATING+(NOLOAD)} :
  56. {
  57. [ .stabstr ]
  58. }
  59. }
  60. EOF