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
section directly. These addresses need to be relocated in unlinked
files.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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)
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | ||
---|---|---|
124–127 | 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 | ||
12–13 | Could you include the source & commands used to build this assembly for reference? |
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp | ||
---|---|---|
124–127 | 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 | ||
12–13 | 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.) |
Is this written with a lambda because DWARFDataExtractor isn't assignable? Perhaps it should/could be made assignable?