From: "tip-bot2 for Vasily Gorbik" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Vasily Gorbik <gor@linux.ibm.com>, Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: objtool/urgent] objtool: Fix elf_create_undef_symbol() endianness
Date: Wed, 12 May 2021 18:32:31 -0000 [thread overview]
Message-ID: <162084435147.29796.6211951426659224988.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3Cpatch-1=2Ethread-6c9df9=2Egit-d39264656387=2Eyou?= =?utf-8?q?r-ad-here=2Ecall-01620841104-ext-2554=40work=2Ehours=3E?=
The following commit has been merged into the objtool/urgent branch of tip:
Commit-ID: 7176af27a8bf4ab5b5c7a1850459b194a21cf876
Gitweb: https://git.kernel.org/tip/7176af27a8bf4ab5b5c7a1850459b194a21cf876
Author: Vasily Gorbik <gor@linux.ibm.com>
AuthorDate: Wed, 12 May 2021 19:42:10 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 12 May 2021 20:25:48 +02:00
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: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index d08f5f3..743c2e9 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -762,6 +762,7 @@ struct symbol *elf_create_undef_symbol(struct elf *elf, const char *name)
data->d_buf = &sym->sym;
data->d_size = sizeof(sym->sym);
data->d_align = 1;
+ data->d_type = ELF_T_SYM;
sym->idx = symtab->len / sizeof(sym->sym);
next reply other threads:[~2021-05-12 20:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 18:32 tip-bot2 for Vasily Gorbik [this message]
2021-05-12 19:20 [tip: objtool/urgent] objtool: Fix elf_create_undef_symbol() endianness tip-bot2 for Vasily Gorbik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=162084435147.29796.6211951426659224988.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=gor@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).