pub struct Elsewhere { /* private fields */ }Expand description
The names whose address only the linker knows.
Two ways in, and the first one holds whichever link is coming. A function this file only declares is one, because a function cannot be copied: it has exactly one address that every object in the program has to agree on, or two pointers to it compare unequal, so the one address is what the table holds and what everything reads. A variable can be copied, and in an executable it is, since the linker answers a reference to one another object defines by making room for it here and copying it there, so the name really does end up somewhere this file can measure to.
The second way in is -fPIC, where the link may be one that produces a shared library and the
copying does not happen. There every replaceable name is in here, defined or not and function or
variable, because the definition the process ends up using may be in another object however
plainly this file defines it. What is not in here is what -fPIC costs nothing for: a static,
and a name marked hidden or protected, which is the reason -fPIC -fvisibility=hidden is the
combination a library that cares about its own speed is built with.
A name this module has never heard of is not in here. Nothing the front end writes produces one, and treating an unknown name as a function would put the addresses the instrumentation takes of its own tables through a table of their own for no reason.
Implementations§
Trait Implementations§
impl Eq for Elsewhere
Source§impl FromIterator<Symbol> for Elsewhere
The same set, written out by hand.
impl FromIterator<Symbol> for Elsewhere
The same set, written out by hand.
Elsewhere::of is how the driver builds one and is the only way a compilation does. This is
for a test that wants to lower one function and say what is outside the file without building a
module for it to be outside of.