This is what ld64 does too, so we have parity here (though I think ld64
still removes dead code more effectively than we do...)
Details
Details
- Reviewers
gkm thakis - Group Reviewers
Restricted Project - Commits
- rG413e249a47ce: [lld-macho][nfc] Test that we don't emit undef symbol errors for dead code
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
lld/test/MachO/treat-undef-sym.s | ||
---|---|---|
61 | (maybe add a new undef symbol and a new _dead symbol in addition to the current one? testing having undefs ref'd by live code seems useful too.) |
lld/test/MachO/treat-undef-sym.s | ||
---|---|---|
61 | good idea :) |
Comment Actions
The PS4 linux build bot is still failing after that fix:
https://lab.llvm.org/buildbot/#/builders/139/builds/12148
Command Output (stderr): -- split-file: error: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/lld/test/MachO/treat-undef-sym.s: No such file or directory --
Comment Actions
Oh, I think int3 should have rm %t and not %s!
should be fixed with https://github.com/llvm/llvm-project/commit/46ef187dccd3be85d0490cf3e5dc73607a4a2ef2 now
Comment Actions
Still failing I'm afraid :(
https://lab.llvm.org/buildbot/#/builders/139/builds/12149
Command Output (stderr): -- /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/lld/test/MachO/treat-undef-sym.s:40:10: error: ERROR: expected string not found in input # ERROR: error: undefined symbol: _bar ^ <stdin>:1:1: note: scanning from here ld64.lld: error: cannot open /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/lld/test/MachO/Output/treat-undef-sym.s.tmp/dead.o: No such file or directory ^ <stdin>:1:11: note: possible intended match here ld64.lld: error: cannot open /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/lld/test/MachO/Output/treat-undef-sym.s.tmp/dead.o: No such file or directory ^ Input file: <stdin> Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/lld/test/MachO/treat-undef-sym.s -dump-input=help explains the following input dump. Input was: <<<<<< 1: ld64.lld: error: cannot open /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/lld/test/MachO/Output/treat-undef-sym.s.tmp/dead.o: No such file or directory check:40'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found check:40'1 ? possible intended match >>>>>> --
Comment Actions
How abt now? (I've tested it locally - Linux and OSX)
(after rG46ef187dccd3be85d0490cf3e5dc73607a4a2ef2)
(maybe add a new undef symbol and a new _dead symbol in addition to the current one? testing having undefs ref'd by live code seems useful too.)