diff options
author | Naveen N Rao <naveen@kernel.org> | 2023-09-13 19:11:29 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-09-18 12:23:47 +1000 |
commit | 60d77ed24bb3068c0837fe45b8921b0a6598829d (patch) | |
tree | e8b6ec828eb85878a5a19175f5a039b5ba3227c7 /lib/xz | |
parent | 27646b2e02b096a6936b3e3b6ba334ae20763eab (diff) | |
download | linux-stable-60d77ed24bb3068c0837fe45b8921b0a6598829d.tar.gz linux-stable-60d77ed24bb3068c0837fe45b8921b0a6598829d.tar.bz2 linux-stable-60d77ed24bb3068c0837fe45b8921b0a6598829d.zip |
powerpc: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION and FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY
We recently added support for -fpatchable-function-entry and it is
enabled by default on ppc32 (ppc64 needs gcc v13.1.0). When building the
kernel for ppc32 and also enabling CONFIG_LD_DEAD_CODE_DATA_ELIMINATION,
we see the below build error with older gcc versions:
powerpc-linux-gnu-ld: init/main.o(__patchable_function_entries): error: need linked-to section for --gc-sections
This error is thrown since __patchable_function_entries section would be
garbage collected with --gc-sections since it does not reference any
other kept sections. This has subsequently been fixed with:
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=b7d072167715829eed0622616f6ae0182900de3e
Disable LD_DEAD_CODE_DATA_ELIMINATION for gcc versions before v11.1.0 if
using -fpatchable-function-entry to avoid this bug.
Fixes: 0f71dcfb4aef ("powerpc/ftrace: Add support for -fpatchable-function-entry")
Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Naveen N Rao <naveen@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230913134129.2782088-1-naveen@kernel.org
Diffstat (limited to 'lib/xz')
0 files changed, 0 insertions, 0 deletions