Authored by labath on Oct 1 2019, 7:25 AM.

# Details

Reviewers
 JDevlieghere dblaikie probinson
Commits
Summary

Handling relocations was not needed when the loclists section was a
DWO-only thing. But since DWARF5, it is possible to use it in regular
objects too, and the standard permits embedding addresses into the
files.

# Diff Detail

Repository
rL LLVM
Build Status
 Buildable 38816 Build 38815: arc lint + arc unit

### Event Timeline

labath created this revision.Oct 1 2019, 7:25 AM
Herald added a project: Restricted Project. Oct 1 2019, 7:26 AM
dblaikie accepted this revision.Oct 1 2019, 7:50 AM

Looks good - thanks! Yeah, I had a few pieces somewhat like this in half-completed states along with the DWARFv4 loclist base address specifier change I committed recently (which I guess might've been related to your motivation here, or not)

This revision is now accepted and ready to land.Oct 1 2019, 7:50 AM
labath updated this revision to Diff 227276.Oct 31 2019, 6:32 AM

Rebase and make independent of D68270 (that is going to take a while).

llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
124–127 ↗(On Diff #227276)

Is this written with a lambda because DWARFDataExtractor isn't assignable? Perhaps it should/could be made assignable?

llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s
11–12 ↗(On Diff #227276)

Could you include the source & commands used to build this assembly for reference?

SouraVX added a subscriber: SouraVX.Nov 3 2019, 8:40 AM
labath marked 2 inline comments as done.Nov 4 2019, 9:50 AM
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
124–127 ↗(On Diff #227276)

It's not default-constructible (which I normally consider to be a good thing) so I had to initialize it in a single statement. That said, I have no idea why I ended up with a lambda here -- a plain ternary operator would work just fine. Using ?: now.

llvm/test/tools/llvm-dwarfdump/X86/debug_loclists.s
11–12 ↗(On Diff #227276)

There isn't a "source", really. I was just adding a bunch of interesting location list entries by hand. (TBE, I did use some source to produce the minimal debug_info blurb needed to be able to print out, but I don't know what it was, and it has been mangled/reduced beyond recognition anyway.)

labath updated this revision to Diff 227731.Nov 4 2019, 9:51 AM

Use ternary expression.

This revision was automatically updated to reflect the committed changes.