orphan-handling fixes for v5.10-rc2

- arm: handle .ARM.exidx and .ARM.extab sections (Nathan Chancellor)
 
 - x86: collect .ctors.* with .ctors (Kees Cook)
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEEpcP2jyKd1g9yPm4TiXL039xtwCYFAl+YbA0WHGtlZXNjb29r
 QGNocm9taXVtLm9yZwAKCRCJcvTf3G3AJv4cD/45Ope94SwA4wUT9oXF3BtIARpJ
 FEGWNNlWzpggLABZmLLK6fcqNfdZ+ukNAthN5JmLuZ/XBDm/GLbDcLAvEkkOWMQq
 PgPGY2sGogQbQnaFj3vTah4BqkzYW/gGFDC93X62yX62gWlazyYbmrjebESOdM6C
 wKvX+A6h/fgdR4dGphwbknlbx61YWhJl/gkTHJ9Oru4blCFrssg1FSTlr3QWTlQx
 Xnu/sXZZxnXL8EOiogjL0ISt3wPxkWeJ0myGQHrVgqrnbjZOikYwfGPBYgGr7LHp
 pj3fMF1EjPT9nr7nkxJK7lM4ugkFvAR2X+9m7UAy76pVDYGwtZ1OnGZbK1A6Xcgb
 S+mQD/4OJ8l747Kmd7Py8Eu89I05kzEwODMidmVDqhpbn4oku6eQXboicUGr0Ayi
 UExKJphYYjyv/DjGIiBjLxFrtRwYRn33YiIM2/rR9g87PtLKaNg/swT87MC9P1gt
 3SnYdhhKITCou+C9n8jwEG9cX58nsiGY/kclCa1NNZSb/X2OJNmNRZYVVBmA1Sep
 LvUhT31YLEeS5Y6skH6q+sFegJoM72FUUFjsN1RwmHHk8Jd4oXkaePtHoN+f1U8g
 LSOd687oYZvFO4o20cHS5g2uksx0g0v2XuNPcTgeJrzQ5AWEWK69K1Q9ZwV5gek+
 /oZlAthmhO8zynYFcg==
 =Wl8C
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2020-10-27 12:42:44 -07:00
commit 8c2ab803e5
2 changed files with 5 additions and 0 deletions

View file

@ -40,6 +40,10 @@ SECTIONS
ARM_DISCARD
#ifndef CONFIG_SMP_ON_UP
*(.alt.smp.init)
#endif
#ifndef CONFIG_ARM_UNWIND
*(.ARM.exidx) *(.ARM.exidx.*)
*(.ARM.extab) *(.ARM.extab.*)
#endif
}

View file

@ -701,6 +701,7 @@
#ifdef CONFIG_CONSTRUCTORS
#define KERNEL_CTORS() . = ALIGN(8); \
__ctors_start = .; \
KEEP(*(SORT(.ctors.*))) \
KEEP(*(.ctors)) \
KEEP(*(SORT(.init_array.*))) \
KEEP(*(.init_array)) \