1

What exactly does mean this error and what can cause it?

readelf: Error: LEB value too large

What LEB stands for? Lower(st) estimated bound(ary)?

I have seen it many times, in particular when building Archlinux packages.

Scrooge McDuck
  • 372
  • 2
  • 14
  • 1
    What kind of file did you run `readelf` on? Was it from an Arch Linux package? Or compiler output with some options? I don't know what that error means, but with more info I might be able to find more. Google found https://github.com/golang/go/issues/39048 which has the same error message from binutils parsing the output of the `go` toolchain. – Peter Cordes Jul 03 '20 at 00:54
  • As in the issue you linked, the messages seem to come from the output of GNU binutils' [`objdump`](https://en.wikipedia.org/wiki/Objdump), of which [`readelf`](https://en.wikipedia.org/wiki/Readelf) seems to be part of. I have seen this error many times, this particular one building [tdlib](https://aur.archlinux.org/telegram-tdlib) from AUR. – Scrooge McDuck Jul 03 '20 at 06:37
  • Yeah, this is a binutils error message, but my question was exactly what kind of file it was, including how it was built. And / or maybe include the rest of what `readelf` said about it. (That would mean digging in to the build scripts that run readelf behind the scenes, to figure out what they're running it on and saving the full output.) – Peter Cordes Jul 03 '20 at 06:46
  • This is happening in the `stripping unneeded symbols from binaries and libraries` task of the `tidying install` phase of makepkg. Here is the [full log](https://arcipelago.ml/res/makepkg-telegram-tdlib.log) – Scrooge McDuck Jul 03 '20 at 14:49

1 Answers1

1

in the DWARF format context, LEB128 stands for ‘‘Little Endian Base 128’’. LEB128 is a space efficient integer encoding if the numbers are small (see DWARF spec: http://dwarfstd.org/doc/DWARF4.pdf , Appendix 4)

The error you faced seems to be caused by a bug of binutils "a bogus error message from the DWARF LEB128 decoder when trying to read a signed LEB128 value containing the largest possible signed negative integer value."

see https://www.mail-archive.com/bug-binutils@gnu.org/msg35315.html

sickleave
  • 26
  • 3