diff options
| author | Ajax <commial@gmail.com> | 2018-07-19 14:05:04 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-07-24 12:53:58 +0200 |
| commit | b4177eb4deb63cf781d0c8d98f834d4a91c71453 (patch) | |
| tree | 5ea26fd68d57bb99831bd9a6b528e0475f5dc60c /example/disasm/full.py | |
| parent | a81cdf889f407d548308e3e2bec88afdb673143b (diff) | |
| download | focaccia-miasm-b4177eb4deb63cf781d0c8d98f834d4a91c71453.tar.gz focaccia-miasm-b4177eb4deb63cf781d0c8d98f834d4a91c71453.zip | |
Add support for reloc and rebase in ContainerELF
Diffstat (limited to 'example/disasm/full.py')
| -rw-r--r-- | example/disasm/full.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/example/disasm/full.py b/example/disasm/full.py index 5658c2c2..746d3ee4 100644 --- a/example/disasm/full.py +++ b/example/disasm/full.py @@ -42,7 +42,7 @@ parser.add_argument('-l', "--dontdis-retcall", action="store_true", help="If set, disassemble only call destinations") parser.add_argument('-s', "--simplify", action="count", help="Apply simplifications rules (liveness, graph simplification, ...)") -parser.add_argument('-o', "--shiftoffset", default=None, +parser.add_argument('-o', "--shiftoffset", default=0, type=lambda x: int(x, 0), help="Shift input binary by an offset") parser.add_argument('-a', "--try-disasm-all", action="store_true", @@ -64,9 +64,8 @@ if args.verbose: log.info('Load binary') if args.rawbinary: - shift = args.shiftoffset if args.shiftoffset is not None else 0 cont = Container.fallback_container(open(args.filename, "rb").read(), - None, addr=shift) + vm=None, addr=args.shiftoffset) else: with open(args.filename, "rb") as fdesc: cont = Container.from_stream(fdesc, addr=args.shiftoffset) |