[PATCH] D89152: [lld][WebAssembly] Add support for -Bsymbolic
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 9 14:50:00 PDT 2020
MaskRay added inline comments.
================
Comment at: lld/wasm/Driver.cpp:496
+ if (config->bsymbolic && (!config->pie && !config->shared)) {
+ warn("-Bsymbolic is only meaningful when combined with -shared, or -pie");
+ }
----------------
sbc100 wrote:
> sbc100 wrote:
> > MaskRay wrote:
> > > In ELF, -Bsymbolic is redundant for executables (-no-pie or -pie).
> > >
> > Interesting, so you are saying the `-Bsymbolic` is basically the default for executable?
> >
> > Wouldn't that mean that, for example, LD_PRELOAD would not work for symbols in the main executable? My understanding is that `-Bsymbolic` would prevent `LD_PRELOAD` from overriding symbols because they would be bound locally. Although I guess I am wrong?
> Indeed you are right, it looks like LD_PRELOAD as no effect on the main executable itself. TIL!
-Bsymbolic is basically the default for executable.
The symbol resolution order: exe, preloaded, needed
In preloaded, the LD_PRELOADed library is listed in a breadth-first search order.
needed is similar.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89152/new/
https://reviews.llvm.org/D89152
More information about the llvm-commits
mailing list