This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
The following commit(s) were added to refs/heads/master by this push:
new cbaa9077 newt: Extend link tables symbols
cbaa9077 is described below
commit cbaa9077d134d479c1bb64d8dabd2d4e03af0c25
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Fri May 23 15:59:42 2025 +0200
newt: Extend link tables symbols
So far for link time generated tables two symbols
were create for each table:
pkg.link_tables:
- foo
would generate link_tables.ld.h with following content
__foo_start__ = .;
KEEP(*(.foo))
KEEP(*(SORT(.foo.*)))
__foo_end__ = .;
Now additional symbol foo will be generated it will
make it more straightforward to use link-time tables
in source code where table can be access directly
by a name specified in yml
__foo_start__ = .;
foo = .;
KEEP(*(.foo))
KEEP(*(SORT(.foo.*)))
__foo_end__ = .;
---
newt/builder/extcmd.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/newt/builder/extcmd.go b/newt/builder/extcmd.go
index 19b70fe0..7fb50a84 100644
--- a/newt/builder/extcmd.go
+++ b/newt/builder/extcmd.go
@@ -188,6 +188,7 @@ func getLinkTableEntry(name string) string {
indent := " "
entry := indent + "__" + name + "_start__ = .;\n" +
+ indent + name + " = .;\n" +
indent + "KEEP(*(." + name + "))\n" +
indent + "KEEP(*(SORT(." + name + ".*)))\n" +
indent + "__" + name + "_end__ = .;\n\n"