[all-commits] [llvm/llvm-project] 454601: [DWARFv5][DWARFLinker] Remove dsymutil-classic com...

avl-llvm via All-commits all-commits at lists.llvm.org
Thu Jun 29 06:48:02 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4546015f867ac19823116374bb1fb21f27bd2447
      https://github.com/llvm/llvm-project/commit/4546015f867ac19823116374bb1fb21f27bd2447
  Author: Alexey Lapshin <a.v.lapshin at mail.ru>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M llvm/include/llvm/DWARFLinker/DWARFLinker.h
    M llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    M llvm/test/tools/dsymutil/X86/dead-stripped.cpp

  Log Message:
  -----------
  [DWARFv5][DWARFLinker] Remove dsymutil-classic compatibility feature as it leads to an error.

DWARFLinker has a compatibility feature with dsymutil-classic.
It may keep location expression attribute even if does not
reference live address. Current llvm-dwarfdump --verify
reports a error if variable references an address but is not
added into the .debug_names table.

error: Name Index @ 0x0: Entry for DIE @ 0xf35 (DW_TAG_variable) with name seed missing.

DW_TAG_variable
  DW_AT_name      ("seed")
  DW_AT_type      (0x00000000000047b7 "uint64_t")
  DW_AT_location  (DW_OP_addr 0x9ff8)  <<<< dead address

DWARFLinker does not add the variable into .debug_names table
because it references dead address. To have a valid variable and
consistent accelerator table it is necessary to remove location expression
referencing dead address. This patch removes dsymutil-classic
compatibilty feature.

Differential Revision: https://reviews.llvm.org/D153988




More information about the All-commits mailing list