]> git.baikalelectronics.ru Git - kernel.git/commit
objtool: Fix elf_create_undef_symbol() endianness
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 12 May 2021 17:42:10 +0000 (19:42 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 May 2021 19:16:53 +0000 (21:16 +0200)
commita66523ef73fc0b9567da66e9ab5f2a1f6a69969e
treefa0fe1f2dd4186d11e806eb6c212271d4d5df27c
parent202d21f8b06a52cf66ca97b838e5479393622d05
objtool: Fix elf_create_undef_symbol() endianness

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: 214d31fe5b1e ("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
tools/objtool/elf.c