Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading line programs from binary compiled with gcc 11.2 #409

Closed
wheirman opened this issue May 23, 2022 · 6 comments
Closed

Error reading line programs from binary compiled with gcc 11.2 #409

wheirman opened this issue May 23, 2022 · 6 comments

Comments

@wheirman
Copy link

I'm getting the following error when reading line programs (readelf.py --debug-dump=decodedline) from a binary compiled with gcc 11.2.0 on Ubuntu 22.04:

ELF error: ('missing terminator', ArrayError('missing terminator', FieldError('expected 1, found 0',)))

The binary is attached here: fft.zip

I tried the code from #408 as well but that didn't help. readelf.py --debug-dump=info works fine on the same binary.

@sevaa
Copy link
Contributor

sevaa commented May 23, 2022

Confirmed, the issue exists, and it's unrelated to #408. The line program header format has been revised in DWARF5, we knew this was coming, now might as well be the time.

@sevaa
Copy link
Contributor

sevaa commented May 25, 2022

@wheirman: I have a fix in the works, #411. Mind if I make a test case for the future out of your binary? If not, let me know how did you build that binary (the compiler options) - I'll try and build something similar.

@wim-heirman-at-intel
Copy link

I'm not sure what the licensing is on that fft example. But a simple hello world gives the same error, you can use this one:
test-dwarf5-lineprogram.zip

This was compiled with just -g as an option.

$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@eliben
Copy link
Owner

eliben commented Jun 13, 2022

Can you please verify that #411 fixes it (it landed on the master branch)?

@Cirn09
Copy link

Cirn09 commented Jun 22, 2022

Work fine! 👍

@eliben
Copy link
Owner

eliben commented Jun 22, 2022

Closing this for now. Please reopen if you see it still doesn't work on the main branch

@eliben eliben closed this as completed Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants