linker: warn about orphan sections
This adds a linker flag and necessary changes to linker scripts so that linker will warn about orphan sections. Relates to #5534. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
08c165f2b0
commit
8ce758a8ff
25 changed files with 397 additions and 0 deletions
|
@ -46,6 +46,22 @@ ENTRY(CONFIG_KERNEL_ENTRY)
|
|||
SECTIONS
|
||||
{
|
||||
|
||||
#include <linker/rel-sections.ld>
|
||||
|
||||
/*
|
||||
* The .plt and .iplt are here according to
|
||||
* 'riscv32-zephyr-elf-ld --verbose', before text section.
|
||||
*/
|
||||
SECTION_PROLOGUE(.plt,,)
|
||||
{
|
||||
*(.plt)
|
||||
}
|
||||
|
||||
SECTION_PROLOGUE(.iplt,,)
|
||||
{
|
||||
*(.iplt)
|
||||
}
|
||||
|
||||
GROUP_START(ROM)
|
||||
_image_rom_start = .;
|
||||
|
||||
|
@ -175,4 +191,7 @@ SECTIONS
|
|||
#endif
|
||||
|
||||
GROUP_END(RAMABLE_REGION)
|
||||
|
||||
#include <linker/debug-sections.ld>
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue