Skip to content

Commit 472b618

Browse files
committed
std::rt: Fix crate_map on Win64
1 parent a130861 commit 472b618

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libstd/rt/crate_map.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ pub fn get_crate_map() -> Option<&'static CrateMap<'static>> {
5656

5757
let sym = unsafe {
5858
let module = dl::open_internal();
59-
let sym = do "__rust_crate_map_toplevel".with_c_str |buf| {
59+
let rust_crate_map_toplevel = if cfg!(target_arch = "x86") {
60+
"__rust_crate_map_toplevel"
61+
} else {
62+
"_rust_crate_map_toplevel"
63+
};
64+
let sym = do rust_crate_map_toplevel.with_c_str |buf| {
6065
dl::symbol(module, buf)
6166
};
6267
dl::close(module);

0 commit comments

Comments
 (0)