This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ld dwarf error
> /usr/bin/ld: Dwarf Error: Could not find abbrev number 110
There are a number of different ways that you might trigger this problem.
The solution depends on which one you are seeing.
When the linker prints an error message, it tries to read the debug info
to pretty print the error message with file and line number info. DWARF2
debug info can not be correctly parsed unless relocations have been performed.
If the linker tries to pretty print an error message before performing
relocations, then the linker will get confused and report that there are
dwarf errors. There isn't anything wrong with the dwarf debug info. This
is just a linker error, one that has been known for a while, but no one has
gotten around to fixing yet.
Normally, these dwarf errors can be ignored. If you see a series of dwarf
errors, and then a non-dwarf error at the end, then the only real error is
the last non-dwarf one. That is the one that the linker tried to pretty print.
I once saw the linker try to pretty print a warning, and end up printing
dwarf errors. This is bad, since this is accidentally turning a warning
into an error. If people are seeing this problem, then it is important that
we try to fix it. I think the warning in my case was the "gets is unsafe"
warning from glibc.
Another way to see this is to do a relocatable link (ld -r) and then use a
tool that reads debug info without relocating it first. Most of binutils
has been fixed, but I think gdb is still broken. If you have an old binutils,
you could see this error from the linker.
Also, you could see this problem if you have a broken dwarf generator.
Jim