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

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 02:04:34 PDT 2024


================
@@ -0,0 +1,13 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-windows-gnu %s -o - | llvm-readobj -r  - | FileCheck %s
+
+// CHECK: Relocations [
+// CHECK:  Section (4) .debug_line {
+// CHECK:    0x22 IMAGE_REL_AMD64_SECREL .debug_line_str (8)
+// CHECK:    0x2C IMAGE_REL_AMD64_SECREL .debug_line_str (8)
+// CHECK:    0x36 IMAGE_REL_AMD64_ADDR64 .text (0)
+// CHECK:  }
+
+main:                                
+	.file	0 "/" "test.c"
+	.loc	0 1 0
----------------
mstorsjo wrote:

Just to be clear - if I understand correctly, the distinction between DWARF 4 and 5 gets activated by these directives here, with DWARF 4, I see that the first parameter to these directives is `1` instead of `0`. Is that right?

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


More information about the llvm-commits mailing list