romlib.ld.S 910 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <lib/xlat_tables/xlat_tables_defs.h>
  7. #include <platform_def.h>
  8. MEMORY {
  9. ROM (rx): ORIGIN = ROMLIB_RO_BASE, LENGTH = ROMLIB_RO_LIMIT - ROMLIB_RO_BASE
  10. RAM (rwx): ORIGIN = ROMLIB_RW_BASE, LENGTH = ROMLIB_RW_END - ROMLIB_RW_BASE
  11. }
  12. OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
  13. OUTPUT_ARCH(PLATFORM_LINKER_ARCH)
  14. ENTRY(jmptbl)
  15. SECTIONS {
  16. . = ROMLIB_RO_BASE;
  17. .text : {
  18. *jmptbl.o(.text)
  19. *(.text*)
  20. *(.rodata*)
  21. } >ROM
  22. __DATA_ROM_START__ = LOADADDR(.data);
  23. .data : {
  24. __DATA_RAM_START__ = .;
  25. *(.data*)
  26. __DATA_RAM_END__ = .;
  27. } >RAM AT>ROM
  28. __DATA_SIZE__ = SIZEOF(.data);
  29. .bss : {
  30. __BSS_START__ = .;
  31. *(.bss*)
  32. __BSS_END__ = .;
  33. } >RAM
  34. __BSS_SIZE__ = SIZEOF(.bss);
  35. }