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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: macros, debug information, and parse_macro_definition



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



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