rust/src/librustc/metadata
Alex Crichton 15e6e8cf3e rustc: Stop using LLVMGetSectionName
The recent pull request to remove libc from libstd has hit a wall in compiling
on windows, and I've been trying to investigate on the try bots as to why (it
compiles locally just fine). To the best of my knowledge, the LLVM section
iterator is behaving badly when iterating over the sections of the libc DLL.

Upon investigating the LLVMGetSectionName function in LLVM, I discovered that
this function doesn't always return a null-terminated string. It returns the
data pointer of a StringRef instance (LLVM's equivalent of &str essentially),
but it has no method of returning the length of the name of the section.

This commit modifies the section iteration when loading libraries to invoke a
custom LLVMRustGetSectionName which will correctly return both the length and
the data pointer.

I have not yet verified that this will fix landing liblibc, as it will require a
snapshot before doing a full test. Regardless, this is a worrisome situation
regarding the LLVM API, and should likely be fixed anyway.
2014-04-03 10:49:35 -07:00
..
common.rs metadata: common: remove dead code 2014-04-01 10:17:32 -04:00
creader.rs rustc: Switch field privacy as necessary 2014-03-31 15:47:36 -07:00
csearch.rs metadata: csearch: remove dead code 2014-04-01 10:18:53 -04:00
cstore.rs metadata: cstore: remove dead code 2014-04-01 10:19:10 -04:00
decoder.rs metadata: decoder: remove dead code 2014-04-02 11:17:15 -04:00
encoder.rs rustc: Switch field privacy as necessary 2014-03-31 15:47:36 -07:00
filesearch.rs metadata: filesearch: remove dead code 2014-04-02 11:17:18 -04:00
loader.rs rustc: Stop using LLVMGetSectionName 2014-04-03 10:49:35 -07:00
mod.rs
tydecode.rs Convert most code to new inner attribute syntax. 2014-03-28 17:12:21 -07:00
tyencode.rs rustc: Switch field privacy as necessary 2014-03-31 15:47:36 -07:00