From: peterz@infradead.org
To: Hugh Dickins <hughd@google.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
linux-kernel@vger.kernel.org, x86@kernel.org, mark@klomp.org
Subject: Re: Static call dependency on libelf version?
Date: Tue, 15 Sep 2020 11:30:16 +0200 [thread overview]
Message-ID: <20200915093016.GV1362448@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <alpine.LSU.2.11.2009142337530.1550@eggly.anvils>
On Tue, Sep 15, 2020 at 12:50:54AM -0700, Hugh Dickins wrote:
> This is just an FYI written from a position of ignorance: I may
> have got it wrong, and my build environment too piecemeal to matter
> to anyone else; but what I saw was weird enough to be worth mentioning,
> in case it saves someone some time.
>
> I usually build and test on mmotm weekly rather linux-next daily.
> No problem with 5.9-rc3-mm1 from 2020-09-04, nor with 5.9-rc5, but
> (on two machines) 5.9-rc5-mm1 from 2020-09-13 could not link vmlinux:
>
> AR init/built-in.a
> LD vmlinux.o
> ld: warning: init/main.o has a corrupt section with a size (7472747368732e00) larger than the file size
> ld: warning: init/main.o has a corrupt section with a size (7472747368732e00) larger than the file size
> ld: warning: init/main.o has a corrupt section with a size (7472747368732e00) larger than the file size
> ld: warning: init/main.o has a corrupt section with a size (7472747368732e00) larger than the file size
> ld: init/built-in.a: member init/main.o in archive is not an object
> make[1]: *** [vmlinux] Error 1
> make: *** [__sub-make] Error 2
>
> On the third machine, a more recent installation, but using the same
> gcc and the same binutils, I could build the same config successfully.
> init/main.o was the same size on each (49216 bytes), but diff of hd
> of the good against the bad showed:
>
> 2702,2709c2702,2709
> < 00bfc0 000001db 00000001 00000003 00000000 >................<
> < 00bfd0 00000000 00000000 0000b316 00000000 >................<
> < 00bfe0 00000018 00000000 00000000 00000000 >................<
> < 00bff0 00000001 00000000 00000008 00000000 >................<
> < 00c000 000001ee 00000004 00000040 00000000 >........@.......<
> < 00c010 00000000 00000000 0000b330 00000000 >........0.......<
> < 00c020 00000090 00000000 0000002d 00000030 >........-...0...<
> < 00c030 00000008 00000000 00000018 00000000 >................<
> ---
> > 00bfc0 00000000 00000000 000001f1 00000000 >................<
> > 00bfd0 79732e00 6261746d 74732e00 62617472 >..symtab..strtab<
> > 00bfe0 68732e00 74727473 2e006261 616c6572 >..shstrtab..rela<
> > 00bff0 7865742e 722e0074 2e616c65 61746164 >.text..rela.data<
> > 00c000 73622e00 722e0073 5f616c65 6172745f >..bss..rela__tra<
> > 00c010 6f706563 73746e69 7274705f 722e0073 >cepoints_ptrs..r<
> > 00c020 2e616c65 74617473 635f6369 2e6c6c61 >ela.static_call.<
> > 00c030 74786574 65722e00 692e616c 2e74696e >text..rela.init.<
>
> and 217 other .os in the build tree also "corrupted".
>
> CONFIG_HAVE_STATIC_CALL=y
> CONFIG_HAVE_STATIC_CALL_INLINE=y
> stand out as new in the .config for 5.9-rc5-mm1, and references
> to objtool in static_call.h and static_call_types.h took me to
> tools/objtool/Makefile, with its use of libelf.
>
> I've copied over files of the newer libelf (0.168) to the failing
> machines, which are now building the 5.9-rc5-mm1 vmlinux correctly.
>
> It looks as if CONFIG_HAVE_STATIC_CALL=y depends on a newer libelf
> than I had before (0.155), and should either insist on a minimum
> version, or else be adjusted to work with older versions.
Hurmph, I have no idea how this happened; clearly none of my machines
have this older libelf :/ (the machines I use most seem to be on 0.180).
I'm also not sure what static_call is doing different from say orc
data generation. Both create and fill sections in similar ways.
Mark, do you have any idea?
next prev parent reply other threads:[~2020-09-15 9:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-15 7:50 Hugh Dickins
2020-09-15 9:30 ` peterz [this message]
2020-09-15 11:24 ` Mark Wielaard
2020-09-15 14:17 ` Josh Poimboeuf
2020-09-15 14:38 ` Mark Wielaard
2020-09-15 15:02 ` Josh Poimboeuf
2020-09-15 21:47 ` Josh Poimboeuf
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=20200915093016.GV1362448@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=hughd@google.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@klomp.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
all inboxes | Powered by JetHome®