Migrate argh to argp, topological-sort to petgraph

This commit is contained in:
2023-08-03 18:55:57 -04:00
parent 8660984d40
commit bd0422e92a
18 changed files with 366 additions and 260 deletions

View File

@@ -5,19 +5,19 @@ use std::{
};
use anyhow::{anyhow, bail, ensure, Context, Result};
use argh::FromArgs;
use argp::FromArgs;
use object::{Architecture, Endianness, Object, ObjectKind, ObjectSection, SectionKind};
use crate::util::file::map_file;
#[derive(FromArgs, PartialEq, Eq, Debug)]
/// Converts an ELF file to a DOL file.
#[argh(subcommand, name = "elf2dol")]
#[argp(subcommand, name = "elf2dol")]
pub struct Args {
#[argh(positional)]
#[argp(positional)]
/// path to input ELF
elf_file: PathBuf,
#[argh(positional)]
#[argp(positional)]
/// path to output DOL
dol_file: PathBuf,
}