linux-stable/arch/x86
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
..
boot x86/boot/compressed: Remove .eh_frame section from bzImage 2020-02-24 12:30:28 +01:00
configs x86: Remove the calgary IOMMU driver 2019-11-15 10:36:59 +01:00
crypto crypto: x86/poly1305 - emit does base conversion itself 2020-01-22 16:21:11 +08:00
entry kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
events Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 09:44:15 -08:00
hyperv x86/hyperv: Suspend/resume the hypercall page for hibernation 2020-02-01 09:41:16 +01:00
ia32 x86: Remove force_iret() 2020-01-08 19:40:51 +01:00
include A set of fixes for X86: 2020-02-09 12:11:12 -08:00
kernel A set of fixes for X86: 2020-02-09 12:11:12 -08:00
kvm KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration 2020-02-05 16:44:06 +01:00
lib Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-31 11:05:33 -08:00
math-emu Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-11-26 10:42:40 -08:00
mm x86: mm: avoid allocating struct mm_struct on the stack 2020-02-04 03:05:25 +00:00
net bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS 2020-01-09 08:46:18 -08:00
oprofile x86: Use pr_warn instead of pr_warning 2019-10-18 15:00:18 +02:00
pci pci-v5.6-changes 2020-01-31 14:48:54 -08:00
platform A single fix for a EFI boot regression on X86 which was caused by the 2020-02-09 11:54:50 -08:00
power x86/asm/32: Change all ENTRY+ENDPROC to SYM_FUNC_* 2019-10-18 12:03:43 +02:00
purgatory Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-11-26 10:42:40 -08:00
ras
realmode kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
tools kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
um um: Implement copy_thread_tls 2020-01-07 13:31:29 +01:00
video
xen A set of fixes for X86: 2020-02-09 12:11:12 -08:00
.gitignore
Kbuild
Kconfig asm-generic/tlb: rename HAVE_RCU_TABLE_FREE 2020-02-04 03:05:26 +00:00
Kconfig.cpu x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs 2020-01-13 18:02:53 +01:00
Kconfig.debug x86: mm: convert dump_pagetables to use walk_page_range 2020-02-04 03:05:25 +00:00
Makefile
Makefile.um
Makefile_32.cpu x86/math-emu: Limit MATH_EMULATION to 486SX compatibles 2019-10-03 10:51:17 +02:00