[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:14 PST 2019
MaskRay added inline comments.
================
Comment at: lld/ELF/Driver.cpp:1790
+ sym->isUsedInRegularObj = true;
+
// If any of our inputs are bitcode files, the LTO code generator may create
----------------
grimar wrote:
> Perhaps a stupid question, but still: can these symbols be lazy? i.e. should `handleUndefined` be used here, like for `config->entry`?
Calling `handleUndefined` will fetch the lazy symbol. However, ld.bfd and gold do not fetch lazy `--init` or `--fini`. I think this is a very minor edge case, being incompatible with GNU linkers should be fine.
Calling `handleUndefined` LGTM because it makes code prettier.
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