[PATCH] D127696: [lld-macho] Print the name of functions containing undefined references

Daniel Bertalan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 14:00:57 PDT 2022


BertalanD created this revision.
BertalanD added reviewers: lld-macho, thakis.
Herald added projects: lld-macho, All.
BertalanD requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The error used to look like this:

  ld64.lld: error: undefined symbol _foo
  >>> referenced by /path/to/bar.o

Now it displays the name of the function that contains the undefined
reference as well:

  ld64.lld: error: undefined symbol _foo
  >>> referenced by /path/to/bar.o:(symbol _baz+0x4)

I plan to use debug information to provide even more context in a future
commit.

Please commit this diff with the following author info:
Daniel Bertalan <dani at danielbertalan.dev>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127696

Files:
  lld/MachO/SymbolTable.cpp
  lld/MachO/SymbolTable.h
  lld/MachO/UnwindInfoSection.cpp
  lld/MachO/Writer.cpp
  lld/test/MachO/invalid/undefined-symbol.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127696.436553.patch
Type: text/x-patch
Size: 7021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/2fc492e9/attachment.bin>


More information about the llvm-commits mailing list