u-boot.lds 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C) 2018 Synopsys, Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <config.h>
  7. MEMORY {
  8. ROM : ORIGIN = ROM_BASE, LENGTH = ROM_SIZE
  9. RAM : ORIGIN = RAM_DATA_BASE, LENGTH = RAM_DATA_SIZE
  10. }
  11. OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
  12. OUTPUT_ARCH(arc)
  13. ENTRY(_start)
  14. SECTIONS
  15. {
  16. . = CONFIG_SYS_MONITOR_BASE;
  17. __image_copy_start = .;
  18. .ivt :
  19. {
  20. __ivt_start = .;
  21. KEEP(*(.ivt));
  22. __ivt_end = .;
  23. } > ROM
  24. . = ALIGN(1024);
  25. .text : {
  26. __text_start = .;
  27. arch/arc/lib/start.o (.text*)
  28. *(.text*)
  29. __text_end = .;
  30. } > ROM
  31. . = ALIGN(4);
  32. .rodata : {
  33. *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
  34. } > ROM
  35. . = ALIGN(4);
  36. .u_boot_list : {
  37. KEEP(*(SORT(.u_boot_list*)));
  38. /* Mark RAM's LMA */
  39. . = ALIGN(4);
  40. __rom_end = .;
  41. } > ROM
  42. .data : {
  43. /* Mark RAM's VMA */
  44. . = ALIGN(4);
  45. /*
  46. * Everything between __ram_start and __ram_start will be
  47. * copied from ROM to RAM in board_early_init_f().
  48. */
  49. __ram_start = .;
  50. *(.data*)
  51. __ram_end = .;
  52. } > RAM AT > ROM
  53. .bss : {
  54. . = ALIGN(1024);
  55. __bss_start = .;
  56. *(.bss*)
  57. __bss_end = .;
  58. } > RAM
  59. /* Keep relocation-related symbols to make linker happy */
  60. __rel_dyn_start = .;
  61. __rel_dyn_end = .;
  62. __image_copy_end = .;
  63. __init_end = .;
  64. }