mynewt-newt icon indicating copy to clipboard operation
mynewt-newt copied to clipboard

newt: Extend link tables filter

Open kasjer opened this issue 9 months ago • 0 comments

So far for link time generated tables only exact section name was added to filter like in this example:

pkg.link_tables:
    - foo

would generate link_tables.ld.h with following content

        __foo_start__ = .;
        KEEP(*(.foo))
        __foo_end__ = .;

Now additional filter will be added

        __foo_start__ = .;
        KEEP(*(.foo))
        KEEP(*(SORT(.foo.*)))
        __foo_end__ = .;

This is general rule for many sections like .text or .data

This is specifically required for xc32 compiler that adds variable name to section by itself even though __attribute__((section, "foo")) is used and arm gcc treats name in attribute verbatim and not as prefix.

kasjer avatar May 16 '24 07:05 kasjer