[PATCH] D102383: [ELF] Add -Bno-symbolic
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 14 02:01:18 PDT 2021
peter.smith accepted this revision.
peter.smith added a comment.
LGTM too.
As an aside, is it worth attempting something like "-warn-backrefs", say "-warn-interposition" for executables. In that case we know the definitions of the executable and all the shared libraries as well as the DT_NEEDED order. We could do something like:
"Warning symbol S of type STT_FUNC is defined in executable A and shared objects B and C, using definition in A.". There would be limitations within LLD as we don't keep much more than the symbol table of shared objects, and it might not know all the shared objects being loaded. There is a possibility of optionally doing more such as loading the dynamic section to check if DF_SYMBOLIC is set, this would permit "Warning symbol S is defined in executable A and shared object B with DF_SYMBOLIC flag. A and B will use different definitions."
Nothing stopping this being an external tool although having it built into the linker makes it easier to use.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102383/new/
https://reviews.llvm.org/D102383
More information about the llvm-commits
mailing list