[PATCH] D127696: [lld-macho] Print the name of functions containing undefined references
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 13 16:01:25 PDT 2022
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
This looks excellent.
The ELF and COFF ports as well as ld64 don't print the offset:
% out/gn/bin/clang -fuse-ld=lld test.cc -isysroot $(xcrun -show-sdk-path) --target=x86_64-pc-linux -nostdlib
ld.lld: error: undefined symbol: f()
>>> referenced by test.cc
>>> /var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/test-d7614d.o:(main)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
% out/gn/bin/clang-cl -fuse-ld=lld test.cc /link /nodefaultlib
lld-link: error: <root>: undefined symbol: mainCRTStartup
lld-link: error: undefined symbol: void __cdecl f(void)
>>> referenced by /var/folders/w6/wpbtszrs7jl9dc9l5qtdkvg00000gn/T/test-611b03.obj:(main)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
% out/gn/bin/clang test.o -isysroot $(xcrun -show-sdk-path)
Undefined symbols for architecture arm64:
"f()", referenced from:
_main in test.o
ld: symbol(s) not found for architecture arm64
Should we omit it too, at least for undefined symbol diags?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127696/new/
https://reviews.llvm.org/D127696
More information about the llvm-commits
mailing list