diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2020-11-13 00:03:26 +0100 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2021-01-13 18:13:12 -0600 |
commit | a1a664ece586457e9f7652b0bc5b08386259e358 (patch) | |
tree | f5f49f41b8cd40b95e5aad14605393f7b5470789 /tools/objtool/orc_gen.c | |
parent | 1d509f2a6ebca1aea3089c769f6375f01a832e9b (diff) | |
download | lwn-a1a664ece586457e9f7652b0bc5b08386259e358.tar.gz lwn-a1a664ece586457e9f7652b0bc5b08386259e358.zip |
objtool: Fix reloc generation on big endian cross-compiles
Relocations generated in elf_rebuild_rel[a]_reloc_section() are broken
if objtool is built and run on a big endian system.
The following errors pop up during x86 cross-compilation:
x86_64-9.1.0-ld: fs/efivarfs/inode.o: bad reloc symbol index (0x2000000 >= 0x22) for offset 0 in section `.orc_unwind_ip'
x86_64-9.1.0-ld: final link failed: bad value
Convert those functions to use gelf_update_rel[a](), similar to what
elf_write_reloc() does.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Co-developed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/orc_gen.c')
0 files changed, 0 insertions, 0 deletions