This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Elf/Stabs not following Stabs spec
- To: Mike_Sorensen at arium dot com
- Subject: Re: Elf/Stabs not following Stabs spec
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 4 Dec 2000 18:25:30 -0800
- CC: binutils at sourceware dot cygnus dot com
- References: <882569AC.000B62F8.00@mailhost.arium.com>
From: Mike_Sorensen@arium.com
Date: Mon, 4 Dec 2000 18:14:22 -0800
I am writing a debug symbols analyzer specifically for binaries that were
created in aout/stabs and converted to elf/stabs with objcopy. The binary
translates correctly but the stabs symbols in the target elf file doesn't
seem to follow the same format as the aout stabs symbols.
Specifically, the stabs spec I'm reading claims each file begins with a
"SO" entry (or series of them) which I see in the aout file. Each #include
file should be indicated with a "SOL" stabs entry. Separate files linked
into the same binary are indicated with "SO" entries. I see all this in
the aout/stabs files.
In the objcopy'd file that is in elf/stabs format, I see things much
differently.
Each stabs "SO" entry is converted to a "SOL" entry with a final "SO" entry
at the end of the file.
Also, "SLINE" entries seem to be have addresses that are relative to the
preceding "FUN" in the elf/stabs while aout/stabs has the "SLINE" entries
with their actual physical addresses.
The spec I'm reading has an entry on Sun's changes to accomodate fast stabs
in Elf, but it doesn't mention very many of the changes I'm seeing.
I've been reading: "The ""stabs"" debug format" by Julia Menapace, ...
Which version? The current version should include all the differences
between ELF and a.out. But you do have to read closely. You can find
the current version at
http://sources.redhat.com/gdb/onlinedocs/stabs_toc.html
Note that this document is not ``the spec.'' It is an ex post facto
description of the observed formats.
Ian