Skip to content

Commit d9e1ae2

Browse files
committed
MW 2.7 LD compatibility fixes & more
- More robust .comment section handling - Auto-create .comment section for objects with common symbols (MW 2.7+ hack) - Support loading REL modules in `dol split` (currently only for references) - Add `dol diff` for quick diffing between linked ELF and expected symbols - Add `dol apply` for applying linked ELF symbols to symbol config file
1 parent 5bdffa9 commit d9e1ae2

16 files changed

+818
-277
lines changed

src/cmd/ar.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use std::{
22
collections::{btree_map::Entry, BTreeMap},
33
fs::File,
4-
io::{BufWriter, Write},
4+
io::Write,
55
path::PathBuf,
66
};
77

88
use anyhow::{anyhow, bail, Result};
99
use argp::FromArgs;
1010
use object::{Object, ObjectSymbol, SymbolScope};
1111

12-
use crate::util::file::{map_file, process_rsp};
12+
use crate::util::file::{buf_writer, map_file, process_rsp};
1313

1414
#[derive(FromArgs, PartialEq, Debug)]
1515
/// Commands for processing static libraries.
@@ -70,7 +70,7 @@ fn create(args: CreateArgs) -> Result<()> {
7070
}
7171

7272
// Write archive
73-
let out = BufWriter::new(File::create(&args.out)?);
73+
let out = buf_writer(&args.out)?;
7474
let mut builder = ar::GnuBuilder::new_with_symbol_table(
7575
out,
7676
true,

0 commit comments

Comments
 (0)