This is an archive of the discontinued LLVM Phabricator instance.

DwarfAccelTable: Enable use of static offsets instead of DIEs and string symbols.
AcceptedPublic

Authored by friss on Mar 10 2015, 11:09 AM.

Details

Summary

llvm-dsymutil doesn't keep DIE objects once it has handled an object,
but the accelerator tables are global and thus are emitted at the end
of the link. The current scheme of using pointers to DIEs can't work
for llvm-dsymutil. llvm-dsymutil however knows the offset a DIE will
be placed at right upon creation though.

Similarly for the string table, llvm-dsymutil doesn't generate MCSymbols
for it, becasue it doesn't need any relocation.

This patch adds 2 knobs to the DwarfAccelTable to be able to use raw
offsets for DIEs and strings, so that it can be used by producers
like llvm-dsymutil.

I separated the knobs for strings and DIEs, as I have another patch
in my backlog that would prevent the creation of MCSymbols for strings
in MachO files (the linker doesn't care about relocations in debug info,
thus there is no point in using a lot of memeory to generate those).
When/If this patch gets applied, it will use a mix of string offset
and DIE objects.

Diff Detail

Event Timeline

friss updated this revision to Diff 21606.Mar 10 2015, 11:09 AM
friss retitled this revision from to DwarfAccelTable: Enable use of static offsets instead of DIEs and string symbols..
friss edited the test plan for this revision. (Show Details)
friss added reviewers: dblaikie, echristo, aprantl.
friss updated this object.
friss added a subscriber: Unknown Object (MLST).
echristo accepted this revision.Mar 13 2015, 3:40 PM
echristo edited edge metadata.

Not a huge fan, but I don't have any options that aren't some ridiculous amount of work here so go ahead.

Also, you have one occurrence of DIe in your patch. :)

-eric

This revision is now accepted and ready to land.Mar 13 2015, 3:40 PM

Looks like patch was not committed.