extern crate mer;

use mer::Elf;

#[test]
fn kernel_elf() {
    let elf = Elf::new(include_bytes!("kernel.elf"));
    assert!(elf.is_ok(), "Failed to parse kernel.elf: {:?}", elf);

    let elf = elf.unwrap();
    for section in elf.sections() {
        println!("Section: {:?} (writable={}, alloc={}, exec={})", section.name(&elf), section.is_writable(), section.is_allocated(), section.is_executable());
    }

    println!("---");

    for symbol in elf.symbols() {
        println!("Symbol: {:?}({:#x})", symbol.name(&elf), symbol.value);
    }

    // assert!(false);
}
