aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/ls.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/ls.rs b/examples/ls.rs
index 0409ae2..d2cd0a2 100644
--- a/examples/ls.rs
+++ b/examples/ls.rs
@@ -3,7 +3,7 @@ use elfload::Elf;
fn main() {
let ls_bytes = include_bytes!("/bin/ls");
- match Elf::<4>::parse(ls_bytes) {
+ match Elf::parse(ls_bytes) {
Ok(elf) => {
println!(
"ELF machine: {:?} entry: 0x{:08x}",
@@ -13,11 +13,11 @@ fn main() {
for l in elf.load_segments() {
println!(
"LOAD: vaddr: 0x{:08x} zero_pad: {:8} {}{}{}",
- l.vaddr,
- l.zero_pad,
- if l.x { 'X' } else { '-' },
- if l.w { 'W' } else { '-' },
- if l.r { 'R' } else { '-' }
+ l.vaddr(),
+ l.zero_padding(),
+ if l.exec() { 'X' } else { '-' },
+ if l.write() { 'W' } else { '-' },
+ if l.read() { 'R' } else { '-' }
);
}
}