Mercurial > lcfOS
annotate python/readelf.py @ 119:f51791638cae
Simplified flashing
author | Windel Bouwman |
---|---|
date | Sat, 12 Jan 2013 10:23:33 +0100 |
parents | db8aafe00d27 |
children | bbf4c9b138d4 |
rev | line source |
---|---|
118 | 1 #!/usr/bin/python |
2 | |
3 import elffile, argparse | |
4 | |
5 parser = argparse.ArgumentParser() | |
6 parser.add_argument('file', type=argparse.FileType('rb')) | |
7 parser.add_argument('-l', action='store_const', const=True, default=False, dest='list_program_headers') | |
8 | |
9 args = parser.parse_args() | |
10 print(args) | |
11 ef = elffile.ElfFile(args.file) | |
12 print(ef) | |
13 | |
14 if args.list_program_headers: | |
15 print('program headers') | |
16 ef.printProgramHeaders() | |
17 |