[Lldb-commits] [PATCH] D32899: [RuntimeDyld] Fix debug section relocation (pr20457)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri May 5 03:58:26 PDT 2017

labath created this revision.
Herald added a subscriber: aprantl.

Debug info sections, (or non-SHF_ALLOC sections in general) should be
linked as if their load address was zero to emulate the behavior of the
static linker.

I've made two tests for this: One checks that we are able to properly
process Modules with debug info in the ProcessAllSections mode. This
tests the feature only indirectly, by making sure we don't assert when
processing relocations, and it only does that on x86_64 linux builds
with asserts.

The second test directly verifies that the relocations were applied correctly,
by directly inspecting the generated sections. This one works on all platforms,
but it is a little cumbersome due to the need to construct a section with
well-defined contents. Nonetheless, most of the code is boilerplate, and it
could be shared if we end up having more tests like these.

This bug was discovered because it was breaking lldb expression evaluation on



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32899.97926.patch
Type: text/x-patch
Size: 7477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170505/1f7ff7ab/attachment-0001.bin>

More information about the lldb-commits mailing list