[PATCH] D25826: [ELF] Show error location for 'undefined symbol' errors

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 07:10:55 PDT 2016


evgeny777 created this revision.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 added subscribers: ikudrin, grimar, llvm-commits.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
Herald added a subscriber: mehdi_amini.

The 'undefined symbol' is likely most common linker error, so linker typically show some location information
to make identifying problem source easier.  With this patch lld will show following information about error source:

- Source file name in case STT_FILE symbol is present in object file
- Function name, if it can be retrieved.
- section name + offset

In addition to this ld/gold can show line number if debug info is present. This is the next thing I plan to do.


Repository:
  rL LLVM

https://reviews.llvm.org/D25826

Files:
  ELF/Error.cpp
  ELF/Error.h
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/Relocations.cpp
  test/ELF/libsearch.s
  test/ELF/linkerscript/edata-etext.s
  test/ELF/linkerscript/ehdr_start.s
  test/ELF/lto/combined-lto-object-name.ll
  test/ELF/sysroot.s
  test/ELF/tls-static.s
  test/ELF/undef-shared.s
  test/ELF/undef.s
  test/ELF/unresolved-symbols.s
  test/ELF/verneed-local.s
  test/ELF/zdefs.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25826.75294.patch
Type: text/x-patch
Size: 12542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/f109ad3f/attachment.bin>


More information about the llvm-commits mailing list