[PATCH] D69985: Keep symbols passed by -init and -fini
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 8 00:49:12 PST 2019
MaskRay added a comment.
--gc-sections retains `--init=` and `--fini=` symbols. Adding the rule to LTO seems to improve consistency.
================
Comment at: lld/test/ELF/lto/init-fini.ll:7
+; RUN: ld.lld -o %t.exe %t.o
+; RUN: llvm-objdump -t %t.exe | FileCheck -check-prefix=TEST1 %s
+
----------------
llvm-objdump -t -> llvm-nm
================
Comment at: lld/test/ELF/lto/init-fini.ll:12
+
+; RUN: ld.lld -o %t.exe -init=foo -fini=bar %t.o
+; RUN: llvm-objdump -t %t.exe | FileCheck -check-prefix=TEST2 %s
----------------
Enhance the test to check `llvm-readelf -d` output for `DT_INIT` and `DT_FINI` as well? It will need -pie (or -shared or --export-dynamic).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69985/new/
https://reviews.llvm.org/D69985
More information about the llvm-commits
mailing list