This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch kasjer/removeme in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit e6dd74907352ff0389b396b1d5e2e7c85e5fb2ce Author: Jerzy Kasenberg <[email protected]> AuthorDate: Thu Jul 2 14:06:35 2026 +0200 test for apple Signed-off-by: Jerzy Kasenberg <[email protected]> --- kernel/os/include/os/link_tables.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel/os/include/os/link_tables.h b/kernel/os/include/os/link_tables.h index 9b1c34ed9..f061260a1 100644 --- a/kernel/os/include/os/link_tables.h +++ b/kernel/os/include/os/link_tables.h @@ -91,11 +91,22 @@ */ #define LINK_TABLE_ELEMENT_TYPE(table_name) table_name##_element_t /* Macro to create symbol attribute for table */ +#if __APPLE__ +#define LINK_TABLE_SECTION(table_name) \ + __attribute__((section("__TEXT," #table_name), used)) +#define LINK_TABLE_ELEMENT_SECTION(table_name, elem) \ + LINK_TABLE_SECTION(table_name) +#undef LINK_TABLE_START +#undef LINK_TABLE_END +#define LINK_TABLE_START(table_name) section$start$__TEXT$##table_name +#define LINK_TABLE_END(table_name) section$end$__TEXT$##table_name +#else #define LINK_TABLE_SECTION(table_name) \ __attribute__((section("." #table_name), used)) /* Macro to create attribute for table with name that may affect order of elements */ #define LINK_TABLE_ELEMENT_SECTION(table_name, elem) \ __attribute__((section("." #table_name "." #elem), used)) +#endif /* Macro to create element that goes to link table. * It could be used like this: * LINK_TABLE_ELEMENT(example1_table, foo5) = {
