Re: [RFC 00/31] objtool, livepatch: Livepatch module generation

Josh Poimboeuf
2024-09-04T06:37:40Z

On Tue, Sep 03, 2024 at 10:26:02PM -0700, Song Liu wrote:
> Hi Josh,
>
> I have attached the config I used for LLVM and gcc.

!IBT is triggering the ORC bug. This should fix it:

diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 518c70b8db50..643bfba65d48 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -60,7 +60,8 @@ vmlinux_link()
# skip output file argument
shift

- if is_enabled CONFIG_LTO_CLANG || is_enabled CONFIG_X86_KERNEL_IBT; then
+ if is_enabled CONFIG_LTO_CLANG || is_enabled CONFIG_X86_KERNEL_IBT ||
+ is_enabled CONFIG_LIVEPATCH; then
# Use vmlinux.o instead of performing the slow LTO link again.
objs=vmlinux.o
libs=