u-boot.lds 1.3 KB

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