[PATCH] D118756: [ELF] Avoid wrapping unreferenced lazy symbols
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 19:05:44 PST 2022
MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/test/ELF/wrap-lazy.test:5
+# RUN: llvm-as %t/lazy.ll -o %tlazybitcode.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu %t/dummy.s -o %tdummy.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu %t/lazy.s -o %tlazy.o
----------------
Drop linux-gnu to make it clear this is a generic ELF behavior.
================
Comment at: lld/test/ELF/wrap-lazy.test:21
+# RUN: llvm-readelf -s %t6.so | FileCheck --check-prefix=LAZY-REF %s
+# RUN: ld.lld -shared -o %t7.so %tweakref.o --start-lib %tlazybitcode.o --wrap lazy
+# RUN: llvm-readelf -s %t7.so | FileCheck --check-prefix=LAZY-REF %s
----------------
Create `ld.lld -shared ... -o %tweakref.so` and additionally test `%tweakref.so --start-lib %tlazy.o --wrap lazy`
================
Comment at: lld/test/ELF/wrap-lazy.test:27
+
+# LAZY-DEF-DAG: {{[0-9]+}} lazy
+# LAZY-DEF-DAG: UND __wrap_lazy
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118756/new/
https://reviews.llvm.org/D118756
More information about the llvm-commits
mailing list