mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
* stabs.texinfo: Add some basic info about stabs-in-elf.
(this may require attention from a tex/texinfo wizard..)
This commit is contained in:
parent
fe560b9fdf
commit
cc4fb84844
@ -1,3 +1,7 @@
|
||||
Fri Jun 18 12:12:57 1993 Fred Fish (fnf@cygnus.com)
|
||||
|
||||
* stabs.texinfo: Add some basic info about stabs-in-elf.
|
||||
|
||||
Fri Jun 18 13:57:09 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||
|
||||
* stabs.texinfo (Top): Minor cleanup.
|
||||
|
@ -3855,5 +3855,49 @@ new type defined in the compilation. GNU C stabs use the type number
|
||||
alone, with no source file number.
|
||||
@end itemize
|
||||
|
||||
@node stabs-in-elf
|
||||
@appendix Using stabs with the ELF object file format.
|
||||
|
||||
The ELF object file format allows tools to create object files with custom
|
||||
sections containing any arbitrary data. To use stabs in ELF object files,
|
||||
the tools create two custom sections, a ".stab" section which contains
|
||||
an array of fixed length structures, one struct per stab, and a ".stabstr"
|
||||
section containing all the variable length strings that are referenced by
|
||||
stabs in the ".stab" section.
|
||||
|
||||
The first stab in the ".stab" section for each object file is a "synthetic
|
||||
stab", generated entirely by the assembler, with no corresponding ".stab"
|
||||
directive as input to the assembler. This stab contains the following
|
||||
fields:
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
Offset in the ".stabstr" section to the source filename.
|
||||
|
||||
@item
|
||||
N_UNDF
|
||||
|
||||
@item
|
||||
Unused field, always zero.
|
||||
|
||||
@item
|
||||
Count of upcoming symbols. I.E. the number of remaining stabs for this
|
||||
object module.
|
||||
|
||||
@item
|
||||
Size of the string table fragment associated with this object module, in
|
||||
bytes.
|
||||
|
||||
@end itemize
|
||||
|
||||
The ".stabstr" section always starts with a null byte (so that string
|
||||
offsets of zero reference a null string), followed by random length strings,
|
||||
each of which is null byte terminated.
|
||||
|
||||
The ELF section header for the ".stab" section has it's sh_link member set
|
||||
to the section number of the ".stabstr" section, and the ".stabstr" section
|
||||
has it's ELF section header sh_type member set to SHT_STRTAB to mark it as
|
||||
a string table.
|
||||
|
||||
@contents
|
||||
@bye
|
||||
|
Loading…
Reference in New Issue
Block a user