u-boot-nand.lds 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Copyright 2009-2012 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include "config.h"
  7. #ifndef CONFIG_SYS_MONITOR_LEN
  8. #define CONFIG_SYS_MONITOR_LEN 0x80000
  9. #endif
  10. OUTPUT_ARCH(powerpc)
  11. /* Do we need any of these for elf?
  12. __DYNAMIC = 0; */
  13. PHDRS
  14. {
  15. text PT_LOAD;
  16. bss PT_LOAD;
  17. }
  18. SECTIONS
  19. {
  20. /* Read-only sections, merged into text segment: */
  21. . = + SIZEOF_HEADERS;
  22. .interp : { *(.interp) }
  23. .text :
  24. {
  25. *(.text*)
  26. } :text
  27. _etext = .;
  28. PROVIDE (etext = .);
  29. .rodata :
  30. {
  31. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  32. } :text
  33. /* Read-write section, merged into data segment: */
  34. . = (. + 0x00FF) & 0xFFFFFF00;
  35. _erotext = .;
  36. PROVIDE (erotext = .);
  37. .reloc :
  38. {
  39. _GOT2_TABLE_ = .;
  40. KEEP(*(.got2))
  41. KEEP(*(.got))
  42. PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
  43. _FIXUP_TABLE_ = .;
  44. KEEP(*(.fixup))
  45. }
  46. __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
  47. __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
  48. .data :
  49. {
  50. *(.data*)
  51. *(.sdata*)
  52. }
  53. _edata = .;
  54. PROVIDE (edata = .);
  55. . = .;
  56. .u_boot_list : {
  57. KEEP(*(SORT(.u_boot_list*)));
  58. }
  59. . = .;
  60. __start___ex_table = .;
  61. __ex_table : { *(__ex_table) }
  62. __stop___ex_table = .;
  63. . = ALIGN(256);
  64. __init_begin = .;
  65. .text.init : { *(.text.init) }
  66. .data.init : { *(.data.init) }
  67. . = ALIGN(256);
  68. __init_end = .;
  69. .bootpg ADDR(.text) - 0x1000 :
  70. {
  71. KEEP(arch/powerpc/cpu/mpc85xx/start.o (.bootpg))
  72. } :text = 0xffff
  73. . = ADDR(.text) + CONFIG_SYS_MONITOR_LEN;
  74. __bss_start = .;
  75. .bss (NOLOAD) :
  76. {
  77. *(.sbss*)
  78. *(.bss*)
  79. *(COMMON)
  80. } :bss
  81. . = ALIGN(4);
  82. __bss_end = . ;
  83. PROVIDE (end = .);
  84. }