u-boot.lds 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  3. * Scott McNutt <smcnutt@psyent.com>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. OUTPUT_FORMAT("elf32-littlenios2")
  8. OUTPUT_ARCH(nios2)
  9. ENTRY(_start)
  10. SECTIONS
  11. {
  12. .text :
  13. {
  14. arch/nios2/cpu/start.o (.text)
  15. *(.text)
  16. *(.text.*)
  17. *(.gnu.linkonce.t*)
  18. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  19. *(.gnu.linkonce.r*)
  20. }
  21. . = ALIGN (4);
  22. _etext = .;
  23. PROVIDE (etext = .);
  24. /* CMD TABLE - sandwich this in between text and data so
  25. * the initialization code relocates the command table as
  26. * well -- admittedly, this is just pure laziness ;-)
  27. */
  28. . = ALIGN(4);
  29. .u_boot_list : {
  30. KEEP(*(SORT(.u_boot_list*)));
  31. }
  32. /* INIT DATA sections - "Small" data (see the gcc -G option)
  33. * is always gp-relative. Here we make all init data sections
  34. * adjacent to simplify the startup code -- and provide
  35. * the global pointer for gp-relative access.
  36. */
  37. _data = .;
  38. .data :
  39. {
  40. *(.data)
  41. *(.data.*)
  42. *(.gnu.linkonce.d*)
  43. }
  44. . = ALIGN(16);
  45. _gp = .; /* Global pointer addr */
  46. PROVIDE (gp = .);
  47. .sdata :
  48. {
  49. *(.sdata)
  50. *(.sdata.*)
  51. *(.gnu.linkonce.s.*)
  52. }
  53. . = ALIGN(4);
  54. _edata = .;
  55. PROVIDE (edata = .);
  56. /* UNINIT DATA - Small uninitialized data is first so it's
  57. * adjacent to sdata and can be referenced via gp. The normal
  58. * bss follows. We keep it adjacent to simplify init code.
  59. */
  60. __bss_start = .;
  61. .sbss (NOLOAD) :
  62. {
  63. *(.sbss)
  64. *(.sbss.*)
  65. *(.gnu.linkonce.sb.*)
  66. *(.scommon)
  67. }
  68. . = ALIGN(4);
  69. .bss (NOLOAD) :
  70. {
  71. *(.bss)
  72. *(.bss.*)
  73. *(.dynbss)
  74. *(COMMON)
  75. *(.scommon)
  76. }
  77. . = ALIGN(4);
  78. __bss_end = .;
  79. PROVIDE (end = .);
  80. /* DEBUG -- symbol table, string table, etc. etc.
  81. */
  82. .stab 0 : { *(.stab) }
  83. .stabstr 0 : { *(.stabstr) }
  84. .stab.excl 0 : { *(.stab.excl) }
  85. .stab.exclstr 0 : { *(.stab.exclstr) }
  86. .stab.index 0 : { *(.stab.index) }
  87. .stab.indexstr 0 : { *(.stab.indexstr) }
  88. .comment 0 : { *(.comment) }
  89. .debug 0 : { *(.debug) }
  90. .line 0 : { *(.line) }
  91. .debug_srcinfo 0 : { *(.debug_srcinfo) }
  92. .debug_sfnames 0 : { *(.debug_sfnames) }
  93. .debug_aranges 0 : { *(.debug_aranges) }
  94. .debug_pubnames 0 : { *(.debug_pubnames) }
  95. .debug_info 0 : { *(.debug_info) }
  96. .debug_abbrev 0 : { *(.debug_abbrev) }
  97. .debug_line 0 : { *(.debug_line) }
  98. .debug_frame 0 : { *(.debug_frame) }
  99. .debug_str 0 : { *(.debug_str) }
  100. .debug_loc 0 : { *(.debug_loc) }
  101. .debug_macinfo 0 : { *(.debug_macinfo) }
  102. .debug_weaknames 0 : { *(.debug_weaknames) }
  103. .debug_funcnames 0 : { *(.debug_funcnames) }
  104. .debug_typenames 0 : { *(.debug_typenames) }
  105. .debug_varnames 0 : { *(.debug_varnames) }
  106. }