This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Elf/Stabs not following Stabs spec


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

Mike



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]