linux-stable/arch
Arvind Sankar 0eea39a234 x86/boot/compressed: Remove .eh_frame section from bzImage
Discarding unnecessary sections with "*(*)" (see thread at Link: below)
works fine with the bfd linker but fails with lld:

  $ make -j$(nproc) -s CC=clang LD=ld.lld O=out.x86_64 distclean defconfig bzImage
  ld.lld: error: discarding .shstrtab section is not allowed

lld tries to also discard essential sections like .shstrtab, .symtab and
.strtab, which results in the link failing since .shstrtab is required
by the ELF specification: the e_shstrndx field in the ELF header is the
index of .shstrtab, and each section in the section table is required to
have an sh_name that points into the .shstrtab.

.symtab and .strtab are also necessary to generate the zoffset.h file
for the bzImage header.

Since the only sizeable section that can be discarded is .eh_frame,
restrict the discard to only .eh_frame to be safe.

 [ bp: Flesh out commit message and replace offending commit with this one. ]

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lkml.kernel.org/r/20200109150218.16544-2-nivedita@alum.mit.edu
2020-02-24 12:30:28 +01:00
..
alpha Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
arc arc: mm: add p?d_leaf() definitions 2020-02-04 03:05:24 +00:00
arm Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
arm64 Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
c6x Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
csky Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
h8300 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
hexagon Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
ia64 proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2020-02-06 08:13:23 +00:00
microblaze Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
mips Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
nds32 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
nios2 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
openrisc TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
parisc Merge branch 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-02-05 07:29:40 +00:00
powerpc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
riscv Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
s390 Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
sh proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
sparc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
um proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
unicore32 MPX requires recompiling applications, which requires compiler support. 2020-01-30 16:11:50 -08:00
x86 x86/boot/compressed: Remove .eh_frame section from bzImage 2020-02-24 12:30:28 +01:00
xtensa Xtensa updates for v5.6: 2020-02-07 12:22:29 -08:00
.gitignore
Kconfig asm-generic/tlb: provide MMU_GATHER_TABLE_FREE 2020-02-04 03:05:26 +00:00