Skip to content

Commit 8c2ab80

Browse files
committed
Merge tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull orphan section fixes from Kees Cook: "A couple corner cases were found from the link-time orphan section handling series: - arm: handle .ARM.exidx and .ARM.extab sections (Nathan Chancellor) - x86: collect .ctors.* with .ctors (Kees Cook)" * tag 'orphan-handling-v5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: arm/build: Always handle .ARM.exidx and .ARM.extab sections vmlinux.lds.h: Keep .ctors.* with .ctors
2 parents f78f63d + c39866f commit 8c2ab80

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

arch/arm/kernel/vmlinux.lds.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ SECTIONS
4040
ARM_DISCARD
4141
#ifndef CONFIG_SMP_ON_UP
4242
*(.alt.smp.init)
43+
#endif
44+
#ifndef CONFIG_ARM_UNWIND
45+
*(.ARM.exidx) *(.ARM.exidx.*)
46+
*(.ARM.extab) *(.ARM.extab.*)
4347
#endif
4448
}
4549

include/asm-generic/vmlinux.lds.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@
701701
#ifdef CONFIG_CONSTRUCTORS
702702
#define KERNEL_CTORS() . = ALIGN(8); \
703703
__ctors_start = .; \
704+
KEEP(*(SORT(.ctors.*))) \
704705
KEEP(*(.ctors)) \
705706
KEEP(*(SORT(.init_array.*))) \
706707
KEEP(*(.init_array)) \

0 commit comments

Comments
 (0)