Skip to content

Commit 772d35b

Browse files
ILyoanbrson
authored andcommitted
---
yaml --- r: 71918 b: refs/heads/dist-snap c: 344628f h: refs/heads/master v: v3
1 parent 958ac51 commit 772d35b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 3d0d144283959bf62368f6965aae14ce95ee286b
10+
refs/heads/dist-snap: 344628fe91ffa0fad32bc5b3eee3e6b4b48c9990
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/metadata/loader.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ fn get_metadata_section(os: os,
206206
while llvm::LLVMIsSectionIteratorAtEnd(of.llof, si.llsi) == False {
207207
let name_buf = llvm::LLVMGetSectionName(si.llsi);
208208
let name = unsafe { str::raw::from_c_str(name_buf) };
209-
if name == meta_section_name(os) {
209+
debug!("get_matadata_section: name %s", name);
210+
if name == read_meta_section_name(os) {
210211
let cbuf = llvm::LLVMGetSectionContents(si.llsi);
211212
let csz = llvm::LLVMGetSectionSize(si.llsi) as uint;
212213
let mut found = None;
@@ -251,6 +252,16 @@ pub fn meta_section_name(os: os) -> ~str {
251252
}
252253
}
253254
255+
pub fn read_meta_section_name(os: os) -> ~str {
256+
match os {
257+
os_macos => ~"__note.rustc",
258+
os_win32 => ~".note.rustc",
259+
os_linux => ~".note.rustc",
260+
os_android => ~".note.rustc",
261+
os_freebsd => ~".note.rustc"
262+
}
263+
}
264+
254265
// A diagnostic function for dumping crate metadata to an output stream
255266
pub fn list_file_metadata(intr: @ident_interner,
256267
os: os,

0 commit comments

Comments
 (0)