macros, debug information, and parse_macro_definition

Andrew Cagney ac131313@redhat.com
Sun May 4 19:41:00 GMT 2003


> Actually, I think that David's proposed representation will compress
> really well, with no new linker work.  The linker's current behavior
> will do everything that's needed.
> 
> Each entry in the .stab section is a fixed-size record; the textual
> portion of the stab is represented as an offset into the .stabstr
> section, which contains null-terminated strings.  The .stabstr section
> is a SHT_STRTAB type section, which means that the linker will
> automatically factor out duplicates.  So if two .stab entries have the
> same text, they'll end up pointing to the same bytes in .stabstr in
> the final executable.
> 
> In David's proposed representation, #including a file into many
> different .o files will produce stabs entries with identical strings,
> so they'll all get factored out nicely.
> 
> All this is completely independent of the BINCL/EINCL -> EXCL
> compression the linker also does for STABS, to factor out duplicated
> entries from the .stab section itself.

So the stabs mechanism might compress down to something useable.  Ah, 
the irony :-)

Andrew




More information about the Gdb mailing list