linux-stable/include
Naveen N. Rao 6af88cc6e4 kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
commit 3e35142ef9 upstream.

Since commit d1bcae833b32f1 ("ELF: Don't generate unused section
symbols") [1], binutils (v2.36+) started dropping section symbols that
it thought were unused.  This isn't an issue in general, but with
kexec_file.c, gcc is placing kexec_arch_apply_relocations[_add] into a
separate .text.unlikely section and the section symbol ".text.unlikely"
is being dropped. Due to this, recordmcount is unable to find a non-weak
symbol in .text.unlikely to generate a relocation record against.

Address this by dropping the weak attribute from these functions.
Instead, follow the existing pattern of having architectures #define the
name of the function they want to override in their headers.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d1bcae833b32f1

[akpm@linux-foundation.org: arch/s390/include/asm/kexec.h needs linux/module.h]
Link: https://lkml.kernel.org/r/20220519091237.676736-1-naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-02 16:18:11 +02:00
..
acpi ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions 2022-01-27 09:00:56 +01:00
asm-generic hugetlbfs: flush TLBs correctly after huge_pmd_unshare 2021-12-08 08:46:52 +01:00
clocksource
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-25 11:46:41 +02:00
drm drm: fix EDID struct for old ARM OABI format 2022-06-14 16:53:47 +02:00
dt-bindings dt-bindings: reset: meson8b: fix duplicate reset IDs 2020-01-23 08:20:29 +01:00
keys KEYS: Don't write out to userspace while holding key semaphore 2020-04-24 08:01:25 +02:00
kvm
linux kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add] 2022-07-02 16:18:11 +02:00
math-emu math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning 2019-12-17 20:38:02 +01:00
media media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros 2020-02-28 16:36:00 +01:00
memory
misc
net netfilter: conntrack: re-fetch conntrack after insertion 2022-06-06 08:20:57 +02:00
pcmcia
ras
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-26 11:40:41 +01:00
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-14 16:53:50 +02:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-23 10:46:27 +02:00
sound ALSA: jack: Access input_dev under mutex 2022-06-14 16:53:44 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 11:40:38 +01:00
trace ata: libata: add qc->flags in ata_qc_complete_template tracepoint 2022-07-02 16:18:08 +02:00
uapi random: ignore GRND_RANDOM in getentropy(2) 2022-06-25 11:46:27 +02:00
video
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 10:13:33 +01:00