ARM: linker script: factor out stuff for the DISCARD section

Move common entries to vmlinux.lds.h and leave XIP and non-XIP entries
in their respective file. The ARM_NOMMU_KEEP() and ARM_NOMMU_DISCARD()
macros are added to be usable within the definition of ARM_DISCARD macro.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Chris Brandt <Chris.Brandt@renesas.com>
This commit is contained in:
Nicolas Pitre
2018-03-05 16:34:03 -05:00
والد 2f181e0ba8
کامیت ab42fad009
3فایلهای تغییر یافته به همراه25 افزوده شده و 32 حذف شده

مشاهده پرونده

@@ -38,20 +38,9 @@ SECTIONS
* unwind sections get included.
*/
/DISCARD/ : {
*(.ARM.exidx.exit.text)
*(.ARM.extab.exit.text)
ARM_CPU_DISCARD(*(.ARM.exidx.cpuexit.text))
ARM_CPU_DISCARD(*(.ARM.extab.cpuexit.text))
ARM_EXIT_DISCARD(EXIT_TEXT)
ARM_EXIT_DISCARD(EXIT_DATA)
EXIT_CALL
#ifndef CONFIG_MMU
*(.text.fixup)
*(__ex_table)
#endif
ARM_DISCARD
*(.alt.smp.init)
*(.discard)
*(.discard.*)
*(.pv_table)
}
. = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
@@ -89,9 +78,7 @@ SECTIONS
. = ALIGN(4);
__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
__start___ex_table = .;
#ifdef CONFIG_MMU
*(__ex_table)
#endif
ARM_MMU_KEEP(*(__ex_table))
__stop___ex_table = .;
}