Thank you for these insights, @haydenridd.
To resolve the issue, I have used the following instruction: elf.link_gc_sections = true;
Option summary:
elf.entry = .{ .symbol_name = "Reset_Handler" };
elf.want_lto = false; // -flto
elf.link_data_sections = true; // -fdata-sections
elf.link_function_sections = true; // -ffunction-sections
elf.link_gc_sections = true; // -Wl,--gc-sections
Notes:
- The
NOLOAD
section is required for the_user_heap_stack
symbol (See this topic for details. - I have corrected
v7e-m+dp
tov7e-m+fp
(Upon verification, my component only has a single-precision FPU). - Regarding the
Reset_Handler
, I am uncertain as well. The linker script already sets it.
I have committed the fixes.
Bonus question:
- How can I enable float parsing with the libc (
-u _printf_float
linker option) ? - Is it possible to generate a .map file using lld ?