rust/src/libstd
Alex Crichton fbf9869702 rustc: Handle some libstd symbole exports better
Right now symbol exports, particularly in a cdylib, are handled by
assuming that `pub extern` combined with `#[no_mangle]` means "export
this". This isn't actually what we want for some symbols that the
standard library uses to implement itself, for example symbols related
to allocation. Additionally other special symbols like
`rust_eh_personallity` have no need to be exported from cdylib crate
types (only needed in dylib crate types).

This commit updates how rustc handles these special symbols by adding to
the hardcoded logic of symbols like `rust_eh_personallity` but also
adding a new attribute, `#[rustc_std_internal_symbol]`, which forces the
export level to be considered the same as all other Rust functions
instead of looking like a C function.

The eventual goal here is to prevent functions like `__rdl_alloc` from
showing up as part of a Rust cdylib as it's just an internal
implementation detail. This then further allows such symbols to get gc'd
by the linker when creating a cdylib.
2017-11-04 20:01:11 -07:00
..
collections [test] Add some #[inline] to HashMap 2017-10-20 11:49:36 -07:00
ffi Fix most rendering warnings from switching to CommonMark 2017-10-20 15:29:35 -04:00
io Rollup merge of #45664 - mbrubeck:docs, r=estebank 2017-11-01 13:32:20 +08:00
net Improve docs for UdpSocket::set_nonblocking. 2017-10-26 10:05:54 -04:00
os Fix doc build on other architectures than linux 2017-10-24 21:58:53 +02:00
prelude Move unused-extern-crate to late pass 2017-08-27 19:02:24 +09:00
rand Introduce tidy lint to check for inconsistent tracking issues 2017-06-16 20:40:40 +02:00
sync Auto merge of #45267 - oconnor663:rwlock_send, r=alexcrichton 2017-11-01 04:32:15 +00:00
sys Fix std compile error for windows-gnu targets without backtrace feature 2017-11-03 15:22:13 +01:00
sys_common Rollup merge of #44775 - MaloJaffre:debug-struct, r=sfackler 2017-10-10 22:43:57 +08:00
thread Auto merge of #45285 - alexcrichton:update-bootstrap, r=Mark-Simulacrum 2017-10-27 18:00:32 +00:00
time Auto merge of #44436 - MicroJoe:master, r=alexcrichton 2017-09-23 22:21:32 +00:00
ascii.rs Fix most rendering warnings from switching to CommonMark 2017-10-20 15:29:35 -04:00
build.rs rustbuild: Support specifying archiver and linker explicitly 2017-10-15 22:10:07 +03:00
Cargo.toml add description to libstd 2017-10-31 15:10:10 -05:00
env.rs Move global vars changing tests into run-pass 2017-06-24 18:23:39 +03:00
error.rs Merge remote-tracking branch 'upstream/master' 2017-09-30 10:08:33 -04:00
f32.rs Revert "Add clamp functions" 2017-09-08 16:07:21 -06:00
f64.rs Revert "Add clamp functions" 2017-09-08 16:07:21 -06:00
fs.rs Made fs::copy return the length of the main stream 2017-09-27 19:43:05 -07:00
heap.rs rustc: Handle some libstd symbole exports better 2017-11-04 20:01:11 -07:00
lib.rs Auto merge of #44764 - nvzqz:master, r=alexcrichton 2017-10-31 23:06:37 +00:00
macros.rs fix stringify docs in std 2017-10-22 13:17:23 -04:00
memchr.rs Fix inconsistent doc headings 2017-08-24 18:42:53 +02:00
num.rs Auto merge of #40706 - irfanhudda:doc-next-power-of-two, r=alexcrichton 2017-06-08 01:07:08 +00:00
panic.rs auto trait future compatibility lint 2017-11-03 16:13:21 -02:00
panicking.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00
path.rs Fix errors in Box<Path> conversions 2017-09-28 10:59:12 -04:00
primitive_docs.rs Update array documentation for Clone trait changes 2017-10-17 08:29:29 +02:00
process.rs Auto merge of #45295 - Technius:docs/process, r=steveklabnik 2017-10-29 06:24:20 +00:00
rt.rs Update bootstrap compiler 2017-08-31 06:58:58 -07:00