2018-11-09 06:44:31 +08:00
|
|
|
#if defined(CONFIG_GEN_ISR_TABLES) && !defined(CONFIG_DYNAMIC_INTERRUPTS)
|
|
|
|
SECTION_PROLOGUE(sw_isr_table, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
*(SW_ISR_TABLE)
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
#endif
|
2016-10-20 23:09:32 +08:00
|
|
|
#ifdef CONFIG_CPLUSPLUS
|
|
|
|
SECTION_PROLOGUE(_CTOR_SECTION_NAME,,)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* The compiler fills the constructor pointers table below,
|
|
|
|
* hence symbol __CTOR_LIST__ must be aligned on 4 byte
|
|
|
|
* boundary. To align with the C++ standard, the first elment
|
|
|
|
* of the array contains the number of actual constructors. The
|
|
|
|
* last element is NULL.
|
|
|
|
*/
|
|
|
|
. = ALIGN(4);
|
|
|
|
__CTOR_LIST__ = .;
|
|
|
|
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
|
|
|
|
KEEP(*(SORT_BY_NAME(".ctors*")))
|
|
|
|
LONG(0)
|
|
|
|
__CTOR_END__ = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
|
|
|
|
SECTION_PROLOGUE(init_array, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
. = ALIGN(4);
|
|
|
|
__init_array_start = .;
|
|
|
|
KEEP(*(SORT_BY_NAME(".init_array*")))
|
|
|
|
__init_array_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
#endif
|
userspace: add K_THREAD_ACCCESS_GRANT()
It's possible to declare static threads that start up as K_USER,
but these threads can't do much since they start with permissions on
no kernel objects other than their own thread object.
Rather than do some run-time synchronization to have some other thread
grant the necessary permissions, we introduce macros
to conveniently assign object permissions to these threads when they
are brought up at boot by the kernel. The tables generated here
are constant and live in ROM when possible.
Example usage:
K_THREAD_DEFINE(my_thread, STACK_SIZE, my_thread_entry,
NULL, NULL, NULL, 0, K_USER, K_NO_WAIT);
K_THREAD_ACCESS_GRANT(my_thread, &my_sem, &my_mutex, &my_pipe);
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-10-18 02:20:22 +08:00
|
|
|
#ifdef CONFIG_USERSPACE
|
|
|
|
/* Build-time assignment of permissions to kernel objects to
|
|
|
|
* threads declared with K_THREAD_DEFINE()
|
|
|
|
*/
|
|
|
|
SECTION_PROLOGUE(object_access, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__object_access_start = .;
|
|
|
|
KEEP(*(".object_access.*"))
|
|
|
|
__object_access_end = .;
|
|
|
|
}
|
|
|
|
#endif
|
2016-10-20 23:09:32 +08:00
|
|
|
SECTION_PROLOGUE (devconfig, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__devconfig_start = .;
|
|
|
|
*(".devconfig.*")
|
|
|
|
KEEP(*(SORT_BY_NAME(".devconfig*")))
|
|
|
|
__devconfig_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
|
2016-10-25 16:02:05 +08:00
|
|
|
SECTION_PROLOGUE(net_l2, (OPTIONAL),)
|
2016-06-16 19:50:38 +08:00
|
|
|
{
|
|
|
|
__net_l2_start = .;
|
|
|
|
*(".net_l2.init")
|
|
|
|
KEEP(*(SORT_BY_NAME(".net_l2.init*")))
|
|
|
|
__net_l2_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
2018-04-27 18:24:02 +08:00
|
|
|
|
|
|
|
#if defined(CONFIG_BT_SETTINGS)
|
|
|
|
SECTION_DATA_PROLOGUE(_bt_settings_area, (OPTIONAL), SUBALIGN(4))
|
|
|
|
{
|
|
|
|
_bt_settings_start = .;
|
|
|
|
KEEP(*(SORT_BY_NAME("._bt_settings.static.*")))
|
|
|
|
_bt_settings_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
#endif
|
2018-05-16 14:50:33 +08:00
|
|
|
|
|
|
|
SECTION_DATA_PROLOGUE(log_const_sections, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__log_const_start = .;
|
|
|
|
KEEP(*(SORT(.log_const_*)));
|
|
|
|
__log_const_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
|
|
|
|
|
|
|
SECTION_DATA_PROLOGUE(log_backends_sections, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__log_backends_start = .;
|
|
|
|
KEEP(*(".log_backends"));
|
|
|
|
__log_backends_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
2018-08-09 15:56:10 +08:00
|
|
|
|
|
|
|
SECTION_DATA_PROLOGUE(shell_root_cmds_sections, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__shell_root_cmds_start = .;
|
|
|
|
KEEP(*(SORT(.shell_root_cmd_*)));
|
|
|
|
__shell_root_cmds_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|
2018-07-19 23:43:39 +08:00
|
|
|
|
|
|
|
SECTION_DATA_PROLOGUE(font_entry_sections, (OPTIONAL),)
|
|
|
|
{
|
|
|
|
__font_entry_start = .;
|
|
|
|
KEEP(*(SORT_BY_NAME(".font_entry.*")))
|
|
|
|
__font_entry_end = .;
|
|
|
|
} GROUP_LINK_IN(ROMABLE_REGION)
|