mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
module, riscv: force sh_addr=0 for arch-specific sections
When linking modules with 'ld.bfd -r', sections defined without an address inherit the location counter, resulting in non-zero sh_addr values in the resulting .ko files. Relocatable objects are expected to have sh_addr=0 for all sections. Non-zero addresses are confusing in this context, typically worse compressible, and may cause tools to misbehave [1]. Force sh_addr=0 for all riscv-specific module sections. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=33958 [1] Signed-off-by: Petr Pavlu <petr.pavlu@suse.com> Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
This commit is contained in:
parent
9cb4d4dc82
commit
04e17ca3f7
|
|
@ -2,8 +2,8 @@
|
|||
/* Copyright (C) 2017 Andes Technology Corporation */
|
||||
#ifdef CONFIG_MODULE_SECTIONS
|
||||
SECTIONS {
|
||||
.plt : { BYTE(0) }
|
||||
.got : { BYTE(0) }
|
||||
.got.plt : { BYTE(0) }
|
||||
.plt 0 : { BYTE(0) }
|
||||
.got 0 : { BYTE(0) }
|
||||
.got.plt 0 : { BYTE(0) }
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user