about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-03-12 09:49:38 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-03-15 22:26:36 -0700
commit0b3df19c6a02a743dae904245c6f98424e75af8c (patch)
tree2b0fbe5eb5646258f5a1bfd5675edd2b2d608f87 /src/rustllvm/ExecutionEngineWrapper.cpp
parenta921dc487319e926467f8e6afd9900ed2f03aaa9 (diff)
downloadrust-0b3df19c6a02a743dae904245c6f98424e75af8c.tar.gz
rust-0b3df19c6a02a743dae904245c6f98424e75af8c.zip
rustc: Tweak where -lmorestack is on link commands
In removing many fields from the crate map, executables no longer always have an
explicit dependency on all upstream libraries. This means that the linker is no
longer picking them up as it used to.

To the best of my knowledge, the current situation is happening:

* On linux, we're passing the --as-needed flag to the linker, meaning that
  libraries are stripped out if there are no references to symbols in them.
* Executables may not reference libstd at all, such as "fn main() {}"
* When linking, the linker will discard libstd because there are no references
  to symbols in it. I presume that this means that all previous libs have had
  all their symbols resolved, so none of the libs are pulling in libstd as a
  dependency.
* The only real dependence on libstd comes from the rust_stack_exhausted symbol
  (which comes from libmorestack), but -lmorestack is at the end so by the time
  this comes up libstd is completely gone, leading to undefined references to
  rust_stack_exhausted

I'm not entirely convinced that this is what's happening, but it appears to be
along these lines. The one thing that I'm sure of is that removing the crate map
(and hence implicit dependency on all upstream libraries) has changed how
objects depend on upstream libraries.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions