Skip to content

Commit

Permalink
std::rt: Fix crate_map on Win64
Browse files Browse the repository at this point in the history
  • Loading branch information
klutzy committed Nov 24, 2013
1 parent a130861 commit 472b618
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/libstd/rt/crate_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

1 comment on commit 472b618

@alexcrichton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.