linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Static call dependency on libelf version?
@ 2020-09-15  7:50 Hugh Dickins
  2020-09-15  9:30 ` peterz
  0 siblings, 1 reply; 7+ messages in thread
From: Hugh Dickins @ 2020-09-15  7:50 UTC (permalink / raw)
  To: Josh Poimboeuf; +Cc: linux-kernel, x86

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.

Hope this helps,
Hugh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-16  0:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  7:50 Static call dependency on libelf version? Hugh Dickins
2020-09-15  9:30 ` peterz
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

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).