kernel_optimize_test/tools/objtool
Vasily Gorbik fbf60f83e2 objtool: Fix elf_create_undef_symbol() endianness
commit 46c7405df7de8deb97229eacebcee96d61415f3f upstream.

Currently x86 cross-compilation fails on big endian system with:

  x86_64-cross-ld: init/main.o: invalid string offset 488112128 >= 6229 for section `.strtab'

Mark new ELF data in elf_create_undef_symbol() as symbol, so that libelf
does endianness handling correctly.

Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: https://lore.kernel.org/r/patch-1.thread-6c9df9.git-d39264656387.your-ad-here.call-01620841104-ext-2554@work.hours
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-25 11:26:56 +02:00
..
arch/x86 x86,objtool: Create .return_sites 2022-07-25 11:26:36 +02:00
Documentation objtool: Support stack layout changes in alternatives 2022-07-25 11:26:06 +02:00
.gitignore
arch.h x86,objtool: Create .return_sites 2022-07-25 11:26:36 +02:00
Build
builtin-check.c x86/retbleed: Add fine grained Kconfig knobs 2022-07-25 11:26:50 +02:00
builtin-orc.c objtool: Refactor ORC section generation 2022-07-25 11:26:05 +02:00
builtin.h x86/retbleed: Add fine grained Kconfig knobs 2022-07-25 11:26:50 +02:00
cfi.h objtool: Introduce CFI hash 2022-07-25 11:26:22 +02:00
check.c x86/retbleed: Add fine grained Kconfig knobs 2022-07-25 11:26:50 +02:00
check.h objtool: Re-add UNWIND_HINT_{SAVE_RESTORE} 2022-07-25 11:26:47 +02:00
elf.c objtool: Fix elf_create_undef_symbol() endianness 2022-07-25 11:26:56 +02:00
elf.h x86,objtool: Create .return_sites 2022-07-25 11:26:36 +02:00
Makefile objtool: Refactor ORC section generation 2022-07-25 11:26:05 +02:00
objtool.c x86,objtool: Create .return_sites 2022-07-25 11:26:36 +02:00
objtool.h x86,objtool: Create .return_sites 2022-07-25 11:26:36 +02:00
orc_dump.c
orc_gen.c objtool: Introduce CFI hash 2022-07-25 11:26:22 +02:00
special.c objtool,x86: Replace alternatives with .retpoline_sites 2022-07-25 11:26:23 +02:00
special.h
sync-check.sh x86/insn: Add a __ignore_sync_check__ marker 2022-07-25 11:26:11 +02:00
warn.h
weak.c objtool: Refactor ORC section generation 2022-07-25 11:26:05 +02:00