mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Linking: Include export lists in debug output.
This commit is contained in:
parent
e48160f6e4
commit
bfd4910fa2
@ -253,11 +253,14 @@ impl<'a> Linker for GnuLinker<'a> {
|
||||
let mut arg = OsString::new();
|
||||
let path = tmpdir.join("list");
|
||||
|
||||
debug!("EXPORTED SYMBOLS:");
|
||||
|
||||
if self.sess.target.target.options.is_like_osx {
|
||||
// Write a plain, newline-separated list of symbols
|
||||
let res = (|| -> io::Result<()> {
|
||||
let mut f = BufWriter::new(File::create(&path)?);
|
||||
for sym in self.info.exports[&crate_type].iter() {
|
||||
debug!(" _{}", sym);
|
||||
writeln!(f, "_{}", sym)?;
|
||||
}
|
||||
Ok(())
|
||||
@ -271,6 +274,7 @@ impl<'a> Linker for GnuLinker<'a> {
|
||||
let mut f = BufWriter::new(File::create(&path)?);
|
||||
writeln!(f, "{{\n global:")?;
|
||||
for sym in self.info.exports[&crate_type].iter() {
|
||||
debug!(" {};", sym);
|
||||
writeln!(f, " {};", sym)?;
|
||||
}
|
||||
writeln!(f, "\n local:\n *;\n}};")?;
|
||||
|
Loading…
Reference in New Issue
Block a user