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

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 09:35:44 PDT 2023


avl created this revision.
avl added reviewers: JDevlieghere, aprantl, rastogishubham, fdeazeve.
Herald added a subscriber: hiraditya.
Herald added a project: All.
avl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153988

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153988.535445.patch
Type: text/x-patch
Size: 8681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230628/ccd2f717/attachment.bin>


More information about the llvm-commits mailing list