linker: add orphan sections to linker script
Add missing sections being reported as orphan with latest compiler version for x86 and discard them. Do the same on ARM. Those sections are used for dynamic linking which we do not support in Zephyr. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
ef672165a7
commit
3ba7097e73
2 changed files with 23 additions and 5 deletions
|
@ -113,12 +113,12 @@ SECTIONS
|
|||
* .plt and .iplt are here according to 'arm-zephyr-elf-ld --verbose',
|
||||
* before text section.
|
||||
*/
|
||||
SECTION_PROLOGUE(.plt,,)
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.plt)
|
||||
}
|
||||
|
||||
SECTION_PROLOGUE(.iplt,,)
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.iplt)
|
||||
}
|
||||
|
@ -293,8 +293,7 @@ SECTIONS
|
|||
* These are here according to 'arm-zephyr-elf-ld --verbose',
|
||||
* before data section.
|
||||
*/
|
||||
SECTION_PROLOGUE(.got,,)
|
||||
{
|
||||
/DISCARD/ : {
|
||||
*(.got.plt)
|
||||
*(.igot.plt)
|
||||
*(.got)
|
||||
|
|
|
@ -69,6 +69,17 @@ SECTIONS
|
|||
|
||||
#include <linker/rel-sections.ld>
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.plt)
|
||||
}
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.iplt)
|
||||
}
|
||||
|
||||
|
||||
GROUP_START(ROMABLE_REGION)
|
||||
#ifdef CONFIG_REALMODE
|
||||
/* 16-bit sections */
|
||||
|
@ -164,7 +175,15 @@ SECTIONS
|
|||
_image_rom_size = _image_rom_end - _image_rom_start;
|
||||
|
||||
GROUP_END(ROMABLE_REGION)
|
||||
|
||||
/*
|
||||
* Needed for dynamic linking which we do not have, do discard
|
||||
*/
|
||||
/DISCARD/ : {
|
||||
*(.got.plt)
|
||||
*(.igot.plt)
|
||||
*(.got)
|
||||
*(.igot)
|
||||
}
|
||||
/* RAMABLE_REGION */
|
||||
GROUP_START(RAMABLE_REGION)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue