mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
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 arm-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>
8 lines
138 B
C
8 lines
138 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifdef CONFIG_ARM_MODULE_PLTS
|
|
SECTIONS {
|
|
.plt 0 : { BYTE(0) }
|
|
.init.plt 0 : { BYTE(0) }
|
|
}
|
|
#endif
|