Commit 1429cfde authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Huacai Chen

LoongArch: Avoid orphan input sections

Ensure that all input sections are listed explicitly in the linker
script, and issue a warning otherwise. This ensures that the binary
image matches the PE/COFF and other image metadata exactly, which is
important for things like code signing.
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent b90cb105
...@@ -51,6 +51,7 @@ config LOONGARCH ...@@ -51,6 +51,7 @@ config LOONGARCH
select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_RWLOCKS
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANTS_NO_INSTR select ARCH_WANTS_NO_INSTR
select BUILDTIME_TABLE_SORT select BUILDTIME_TABLE_SORT
select COMMON_CLK select COMMON_CLK
......
...@@ -77,6 +77,8 @@ SECTIONS ...@@ -77,6 +77,8 @@ SECTIONS
PERCPU_SECTION(1 << CONFIG_L1_CACHE_SHIFT) PERCPU_SECTION(1 << CONFIG_L1_CACHE_SHIFT)
#endif #endif
.rela.dyn : ALIGN(8) { *(.rela.dyn) *(.rela*) }
.init.bss : { .init.bss : {
*(.init.bss) *(.init.bss)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment