Having alphabetical order on an init block causes a linker error.
So it is one of the things replaced when translating a block to its
corresponding init block.
The recent changes in ff8b24b6bd caused
iterable sections having ONLY alphabetical order as an attribute,
triggering a bug in this regexp.
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
Implement the MIN_SIZE and MAX_SIZE options to
zephyr_linker_section_configurefor the IAR icf linker file
generator
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
To circumvent peculiarities in the linker, the _init blocks
(as well as their content) needs to be tagged with keep.
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
Add cmake linker generator things for .last_section.
Follow up to #88970. Fixes bug #89719, for gcc/ld & iar
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
This will implement a way of doing static initialization
the "IAR" way. This is done by calling __iar_data_init3
which handles all static initialization that is mentioned
in the linker file "initialize by copy".
Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
zephyr_linker_section(... ADDRESS 0xF00) was broken. The fixed
placement was using their parent group address.
This also removes some dead code in config_file_script.cmake that
helped confuse what is going on with fixed sections.
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>
Ensure the priority is surrounded by underscores for clarity. This makes
sections show up as
z_init_PRE_KERNEL_1_0_0_ instead of
z_init_PRE_KERNEL_10_0_
Signed-off-by: Josh DeWitt <josh.dewitt@garmin.com>
I have found a number of problems that shows up for CONFIG_USERSPACE,
but may ake effect even without it.
* Output the x_init block even if x dont have any content. This is
rather common if you have sections guarded with PASS.
* Put KEEP on init-blocks. To circumvent peculiarities in ilink,
the _init blocks (as well as their content) needs to be tagged
with keep.
* Handle noinit linker sections. zephyr_linker_section( NOINIT )
has been ignored so far. This change fixes that and puts it as
do not initialize { }
Signed-off-by: Björn Bergman <bjorn.bergman@iar.com>