Files
kernel_samsung_a71/include/linux
Naveen N. Rao 6af88cc6e4 kexec_file: drop weak attribute from arch_kexec_apply_relocations[_add]
commit 3e35142ef99fe6b4fe5d834ad43ee13cca10a2dc 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
..
2018-02-22 15:42:23 +01:00
2017-08-30 14:40:40 +02:00
2018-08-03 07:50:38 +02:00
2017-08-24 13:23:03 -07:00
2019-11-24 08:22:48 +01:00
2021-12-08 08:46:55 +01:00
2021-12-08 08:46:55 +01:00
2020-04-02 16:34:21 +02:00
2018-02-22 15:42:24 +01:00
2019-12-17 20:38:50 +01:00
2021-03-03 18:22:46 +01:00
2021-02-07 14:47:41 +01:00
2021-11-26 11:40:20 +01:00
2017-08-28 20:51:22 +02:00
2017-09-07 11:53:11 +02:00
2019-12-31 12:37:21 +01:00
2021-07-11 12:48:09 +02:00
2020-07-29 07:42:55 +02:00
2018-02-22 15:42:23 +01:00
2017-09-25 08:56:05 -06:00
2020-11-18 18:28:00 +01:00
2020-03-20 10:54:12 +01:00
2019-06-11 12:21:48 +02:00
2020-04-02 16:34:36 +02:00
2018-11-13 11:15:11 -08:00
2020-12-11 13:39:04 +01:00
2020-04-02 16:34:36 +02:00
2017-08-31 18:50:14 +02:00
2021-12-14 10:16:55 +01:00