Mercurial > lcfOS
comparison python/readelf.py @ 126:bbf4c9b138d4
Changes to elf reading
author | Windel Bouwman |
---|---|
date | Sun, 13 Jan 2013 12:14:27 +0100 |
parents | db8aafe00d27 |
children |
comparison
equal
deleted
inserted
replaced
125:1ee5f36b34ed | 126:bbf4c9b138d4 |
---|---|
11 ef = elffile.ElfFile(args.file) | 11 ef = elffile.ElfFile(args.file) |
12 print(ef) | 12 print(ef) |
13 | 13 |
14 if args.list_program_headers: | 14 if args.list_program_headers: |
15 print('program headers') | 15 print('program headers') |
16 ef.printProgramHeaders() | 16 phs = ef.parsePrograms() |
17 print(phs) | |
18 for ph in phs: | |
19 print('type=0x{0:X} vaddr=0x{1:X} filesz=0x{2:X}'.format(ph.p_type, ph.p_vaddr, ph.p_filesz)) | |
17 | 20 |