diff options
author | Alexander Lobakin <alobakin@pm.me> | 2021-01-10 12:56:34 +0100 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-01-15 15:27:54 +0100 |
commit | 008c3cbd5eb8f5efc539cbec9abca9f7e32ea631 (patch) | |
tree | c8e33e914b7c3e13507e7029e960fcd07fb115ba | |
parent | MIPS: properly stop .eh_frame generation (diff) | |
download | linux-008c3cbd5eb8f5efc539cbec9abca9f7e32ea631.tar.xz linux-008c3cbd5eb8f5efc539cbec9abca9f7e32ea631.zip |
MIPS: vmlinux.lds.S: explicitly catch .rel.dyn symbols
According to linker warnings, both GCC and LLVM generate '.rel.dyn'
symbols:
mips-alpine-linux-musl-ld: warning: orphan section `.rel.dyn'
from `init/main.o' being placed in section `.rel.dyn'
Link-time assertion shows that this section is sometimes empty,
sometimes not, depending on machine bitness and the compiler [0]:
LD .tmp_vmlinux.kallsyms1
mips64-linux-gnu-ld: Unexpected run-time relocations (.rel) detected!
Just use the ARM64 approach and declare it in vmlinux.lds.S closer
to __init_end.
[0] https://lore.kernel.org/linux-mips/20210109111259.GA4213@alpha.franken.de
Reported-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-rw-r--r-- | arch/mips/kernel/vmlinux.lds.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index 10d8f0dcb76b..70bba1ff08da 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -137,6 +137,11 @@ SECTIONS PERCPU_SECTION(1 << CONFIG_MIPS_L1_CACHE_SHIFT) #endif + .rel.dyn : ALIGN(8) { + *(.rel) + *(.rel*) + } + #ifdef CONFIG_MIPS_ELF_APPENDED_DTB .appended_dtb : AT(ADDR(.appended_dtb) - LOAD_OFFSET) { *(.appended_dtb) |