std::rt: Fix crate_map on Win64

This commit is contained in:
klutzy 2013-11-24 18:42:40 +09:00
parent a130861d31
commit 472b618248
1 changed files with 6 additions and 1 deletions

View File

@ -56,7 +56,12 @@ pub fn get_crate_map() -> Option<&'static CrateMap<'static>> {
let sym = unsafe {
let module = dl::open_internal();
let sym = do "__rust_crate_map_toplevel".with_c_str |buf| {
let rust_crate_map_toplevel = if cfg!(target_arch = "x86") {
"__rust_crate_map_toplevel"
} else {
"_rust_crate_map_toplevel"
};
let sym = do rust_crate_map_toplevel.with_c_str |buf| {
dl::symbol(module, buf)
};
dl::close(module);