Skip to content

Commit

Permalink
MW 2.7 LD compatibility fixes & more
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
encounter committed Aug 9, 2023
1 parent 5bdffa9 commit d9e1ae2
Show file tree
Hide file tree
Showing 16 changed files with 818 additions and 277 deletions.
6 changes: 3 additions & 3 deletions src/cmd/ar.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use std::{
collections::{btree_map::Entry, BTreeMap},
fs::File,
io::{BufWriter, Write},
io::Write,
path::PathBuf,
};

use anyhow::{anyhow, bail, Result};
use argp::FromArgs;
use object::{Object, ObjectSymbol, SymbolScope};

use crate::util::file::{map_file, process_rsp};
use crate::util::file::{buf_writer, map_file, process_rsp};

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

// Write archive
let out = BufWriter::new(File::create(&args.out)?);
let out = buf_writer(&args.out)?;
let mut builder = ar::GnuBuilder::new_with_symbol_table(
out,
true,
Expand Down
Loading

0 comments on commit d9e1ae2

Please sign in to comment.