[PATCH] D33621: Fix for -wrap linker option and LTO, PR 33145
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 10:59:15 PDT 2017
pcc added inline comments.
================
Comment at: lld/test/ELF/lto/defsym.ll:13-14
+; CHECK-NEXT: pushq %rax
+; CHECK-NEXT: callq 74
+; CHECK-NEXT: callq 85
+
----------------
These are addresses of PLT entries, right? Can you avoid magic numbers here and make what you are testing for more explicit? I think you can do that by making the symbols hidden and checking that the calls correspond to the correct symbol addresses. Same for wrap-2.ll.
================
Comment at: llvm/lib/LTO/LTO.cpp:442
+ if (Res.LinkerRedefined)
+ OS << 'r';
OS << '\n';
----------------
You also need to add support for `'r'` to llvm-lto2. Please also add an llvm-lto2 based test that verifies that the linkage has changed.
https://reviews.llvm.org/D33621
More information about the llvm-commits
mailing list