u-boot.lds 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * (C) Copyright 2003
  3. * Wolfgang Denk Engineering, <wd@denx.de>
  4. *
  5. * SPDX-License-Identifier: GPL-2.0+
  6. */
  7. #if defined(CONFIG_64BIT)
  8. #define PTR_COUNT_SHIFT 3
  9. #else
  10. #define PTR_COUNT_SHIFT 2
  11. #endif
  12. OUTPUT_ARCH(mips)
  13. ENTRY(_start)
  14. SECTIONS
  15. {
  16. . = 0x00000000;
  17. . = ALIGN(4);
  18. .text : {
  19. __text_start = .;
  20. *(.text*)
  21. __text_end = .;
  22. }
  23. . = ALIGN(4);
  24. .rodata : {
  25. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  26. }
  27. . = ALIGN(4);
  28. .data : {
  29. *(.data*)
  30. }
  31. . = ALIGN(4);
  32. .sdata : {
  33. *(.sdata*)
  34. }
  35. . = ALIGN(4);
  36. .u_boot_list : {
  37. KEEP(*(SORT(.u_boot_list*)));
  38. }
  39. . = ALIGN(4);
  40. __image_copy_end = .;
  41. __init_end = .;
  42. /*
  43. * .rel must come last so that the mips-relocs tool can shrink
  44. * the section size & the PT_LOAD program header filesz.
  45. */
  46. .rel : {
  47. __rel_start = .;
  48. BYTE(0x0)
  49. . += (32 * 1024) - 1;
  50. }
  51. _end = .;
  52. .bss __rel_start (OVERLAY) : {
  53. __bss_start = .;
  54. *(.sbss.*)
  55. *(.bss.*)
  56. *(COMMON)
  57. . = ALIGN(4);
  58. __bss_end = .;
  59. }
  60. .dynsym _end : {
  61. *(.dynsym)
  62. }
  63. .dynbss : {
  64. *(.dynbss)
  65. }
  66. .dynstr : {
  67. *(.dynstr)
  68. }
  69. .dynamic : {
  70. *(.dynamic)
  71. }
  72. .plt : {
  73. *(.plt)
  74. }
  75. .interp : {
  76. *(.interp)
  77. }
  78. .gnu : {
  79. *(.gnu*)
  80. }
  81. .MIPS.stubs : {
  82. *(.MIPS.stubs)
  83. }
  84. .hash : {
  85. *(.hash)
  86. }
  87. }