[llvm] [DWARF5][COFF] Fix wrong relocation in .debug_line (PR #83773)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 22:44:47 PST 2024


timoh-ba wrote:

> Ah, fair enough - if there's similar code elsewhere I'm more or less happy to hand-wave/not think about it too much harder. But yeah, some test coverage would be good.

You're right, some tests would be good, I'll add one; though it will probably early next week when I'll get around to it. If you *really* wanted to test this you'd have to compile code, link it & inspect the dwarf information - though with LLVM's test system it's probably easier to just verify that the relocations in the object file are correct. What I don't like about that is that it assumes that section-relative relocations are indeed the correct choice here instead of verifying that they are. We can test if we emit section relative relocs, but not if section relative relocs are in fact correct.

> FYI, I tested this patch in my rudimentary llvm-mingw smoke test setup for LLDB, and there are at least other issues present still after this (not sure if they are on the LLDB side or code generation side though).

That's a pity, I haven't tested it with lldb, just looked at the dwarf information using llvm-dwarfdump & libdwarfs dwarfdump and it looked good.

https://github.com/llvm/llvm-project/pull/83773


More information about the llvm-commits mailing list