Skip to content

Commit 93928d4

Browse files
committed
Merge tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Three fixes for various bogosity in our linker script, revealed by the recent commit which changed discard behaviour with some toolchains. * tag 'powerpc-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/vmlinux.lds: Don't discard .comment powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT
2 parents e9ffbf1 + be5f95c commit 93928d4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/powerpc/kernel/vmlinux.lds.S

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define BSS_FIRST_SECTIONS *(.bss.prominit)
99
#define EMITS_PT_NOTE
1010
#define RO_EXCEPTION_TABLE_ALIGN 0
11+
#define RUNTIME_DISCARD_EXIT
1112

1213
#define SOFT_MASK_TABLE(align) \
1314
. = ALIGN(align); \
@@ -410,9 +411,12 @@ SECTIONS
410411
DISCARDS
411412
/DISCARD/ : {
412413
*(*.EMB.apuinfo)
413-
*(.glink .iplt .plt .rela* .comment)
414+
*(.glink .iplt .plt)
414415
*(.gnu.version*)
415416
*(.gnu.attributes)
416417
*(.eh_frame)
418+
#ifndef CONFIG_RELOCATABLE
419+
*(.rela*)
420+
#endif
417421
}
418422
}

0 commit comments

Comments
 (0)