[all-commits] [llvm/llvm-project] 7650a0: [DWARF5][COFF] Emit section-relative .debug_line_s...

timoh-ba via All-commits all-commits at lists.llvm.org
Thu Mar 21 08:30:32 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7650a01927b8488b1d6d0930109e78c695193faf
      https://github.com/llvm/llvm-project/commit/7650a01927b8488b1d6d0930109e78c695193faf
  Author: timoh-ba <t.habighorst at beckhoff.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M llvm/lib/MC/MCDwarf.cpp
    A llvm/test/MC/COFF/dwarf5lineinfo.s

  Log Message:
  -----------
  [DWARF5][COFF] Emit section-relative .debug_line_str relocations (#83773)

Dwarf 5 allows separating filenames from .debug_line into a separate
.debug_line_str section. The strings are referenced relative to the
start of the .debug_line_str section. Previously, on COFF, the
relocation information instead caused offsets to be relocated to the
base address of the COFF-File. This lead  to wrong offsets in linked
COFF (PE) files which caused the debugger to be unable to find the
correct source files.

This patch fixes this problem by making the offsets relative to the
start of the .debug_line_str section instead. There should be no
changes for ELF-Files as everything seems to be working there.

A test is also added to ensure that the correct relocation entries are
emitted.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list