common-ram.cmake 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # originates from common-ram.ld
  2. if(CONFIG_GEN_SW_ISR_TABLE AND CONFIG_DYNAMIC_INTERRUPTS)
  3. # ld align has been changed to subalign to provide identical behavior scatter vs. ld.
  4. zephyr_linker_section(NAME sw_isr_table
  5. GROUP DATA_REGION
  6. ${XIP_ALIGN_WITH_INPUT} SUBALIGN ${CONFIG_ARCH_SW_ISR_TABLE_ALIGN}
  7. )
  8. zephyr_linker_section_configure(
  9. SECTION sw_isr_table
  10. INPUT ".gnu.linkonce.sw_isr_table*"
  11. )
  12. endif()
  13. zephyr_linker_section(NAME device_states GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
  14. zephyr_linker_section_configure(SECTION device_states
  15. KEEP INPUT ".z_devstate" ".z_devstate.*"
  16. )
  17. if(CONFIG_PM_DEVICE)
  18. zephyr_linker_section(NAME pm_device_slots GROUP DATA_REGION TYPE NOLOAD NOINPUT ${XIP_ALIGN_WITH_INPUT})
  19. zephyr_linker_section_configure(SECTION pm_device_slots KEEP INPUT ".z_pm_device_slots")
  20. endif()
  21. zephyr_linker_section(NAME initshell GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT})
  22. zephyr_linker_section_configure(SECTION initshell
  23. KEEP INPUT ".shell_module_*"
  24. SYMBOLS __shell_module_start __shell_module_end
  25. )
  26. zephyr_linker_section_configure(SECTION initshell
  27. KEEP INPUT ".shell_cmd_*"
  28. SYMBOLS __shell_cmd_start __shell_end_end
  29. )
  30. zephyr_linker_section(NAME log_dynamic GROUP DATA_REGION NOINPUT)
  31. zephyr_linker_section_configure(SECTION log_dynamic KEEP INPUT ".log_dynamic_*")
  32. zephyr_iterable_section(NAME _static_thread_data GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  33. if(CONFIG_USERSPACE)
  34. # All kernel objects within are assumed to be either completely
  35. # initialized at build time, or initialized automatically at runtime
  36. # via iteration before the POST_KERNEL phase.
  37. #
  38. # These two symbols only used by gen_kobject_list.py
  39. # _static_kernel_objects_begin = .;
  40. endif()
  41. zephyr_iterable_section(NAME k_timer GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  42. zephyr_iterable_section(NAME k_mem_slab GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  43. zephyr_iterable_section(NAME k_mem_pool GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  44. zephyr_iterable_section(NAME k_heap GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  45. zephyr_iterable_section(NAME k_mutex GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  46. zephyr_iterable_section(NAME k_stack GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  47. zephyr_iterable_section(NAME k_msgq GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  48. zephyr_iterable_section(NAME k_mbox GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  49. zephyr_iterable_section(NAME k_pipe GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  50. zephyr_iterable_section(NAME k_sem GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  51. zephyr_iterable_section(NAME k_queue GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  52. zephyr_iterable_section(NAME k_condvar GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  53. zephyr_linker_section(NAME _net_buf_pool_area GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  54. zephyr_linker_section_configure(SECTION _net_buf_pool_area
  55. KEEP SORT NAME INPUT "._net_buf_pool.static.*"
  56. SYMBOLS _net_buf_pool_list
  57. )
  58. if(CONFIG_NETWORKING)
  59. zephyr_iterable_section(NAME net_if GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  60. zephyr_iterable_section(NAME net_if_dev GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  61. zephyr_iterable_section(NAME net_l2 GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  62. zephyr_iterable_section(NAME eth_bridge GROUP DATA_REGION ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  63. endif()
  64. if(CONFIG_UART_MUX)
  65. zephyr_linker_section(NAME uart_mux GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 4)
  66. zephyr_linker_section_configure(SECTION uart_mux
  67. KEEP SORT NAME INPUT ".uart_mux.*"
  68. )
  69. endif()
  70. if(CONFIG_USB_DEVICE_STACK)
  71. zephyr_linker_section(NAME usb_descriptor GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
  72. zephyr_linker_section_configure(SECTION usb_descriptor
  73. KEEP SORT NAME INPUT ".usb.descriptor*"
  74. )
  75. zephyr_linker_section(NAME usb_data GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
  76. zephyr_linker_section_configure(SECTION usb_data
  77. KEEP SORT NAME INPUT ".usb.data*"
  78. )
  79. endif()
  80. if(CONFIG_USB_DEVICE_BOS)
  81. zephyr_linker_section(NAME usb_bos_desc GROUP DATA_REGION NOINPUT ${XIP_ALIGN_WITH_INPUT} SUBALIGN 1)
  82. zephyr_linker_section_configure(SECTION usb_data
  83. KEEP SORT NAME INPUT ".usb.bos_desc"
  84. )
  85. endif()
  86. #if(CONFIG_USERSPACE)
  87. # _static_kernel_objects_end = .;
  88. #endif()
  89. #