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
linux.