(Previous patch set was reverted due to issue with priv_stack. Resubmitting after fixing the faults caused by priv_stack.noinit not at the end of RAM.) This adds a linker flag and necessary changes to linker scripts so that linker will warn about orphan sections. Relates to #5534. Fixes #10473, #10474, #10515. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
33 lines
545 B
Text
33 lines
545 B
Text
/*
|
|
* .rel.* are for relocation.
|
|
* These are being produced by compiler/linker.
|
|
* Specify these here so they are not considered orphan sections.
|
|
*/
|
|
|
|
SECTION_PROLOGUE(.rel.plt,,)
|
|
{
|
|
*(.rel.plt)
|
|
|
|
PROVIDE_HIDDEN (__rel_iplt_start = .);
|
|
*(.rel.iplt)
|
|
PROVIDE_HIDDEN (__rel_iplt_end = .);
|
|
}
|
|
|
|
SECTION_PROLOGUE(.rela.plt,,)
|
|
{
|
|
*(.rela.plt)
|
|
|
|
PROVIDE_HIDDEN (__rela_iplt_start = .);
|
|
*(.rela.iplt)
|
|
PROVIDE_HIDDEN (__rela_iplt_end = .);
|
|
}
|
|
|
|
SECTION_PROLOGUE(.rel.dyn,,)
|
|
{
|
|
*(.rel.*)
|
|
}
|
|
|
|
SECTION_PROLOGUE(.rela.dyn,,)
|
|
{
|
|
*(.rela.*)
|
|
}
|