module, m68k: 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 m68k-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:
Petr Pavlu 2026-03-27 08:59:02 +01:00 committed by Sami Tolvanen
parent c5553deb57
commit 9cb4d4dc82

View File

@ -1,5 +1,5 @@
SECTIONS {
.m68k_fixup : {
.m68k_fixup 0 : {
__start_fixup = .;
*(.m68k_fixup)
__stop_fixup = .;