aboutsummaryrefslogtreecommitdiffstats
path: root/bfd/load.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-04-21 12:48:01 +0000
committerbloodstalker <thabogre@gmail.com>2018-04-21 12:48:01 +0000
commit64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d (patch)
treedfe134f5f96fdf0fca302db6292ef0f58f54a109 /bfd/load.py
parentfixed #29 (diff)
downloadmutator-64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d.tar.gz
mutator-64d1ba4efcd6e2f0d01cbf5bc373c47547a7906d.zip
two more options for load.py. also fixed the default lua script for bruiser. now it works for everyone if luarocks is in path.
Diffstat (limited to '')
-rwxr-xr-xbfd/load.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bfd/load.py b/bfd/load.py
index 4e85ca7..9393c18 100755
--- a/bfd/load.py
+++ b/bfd/load.py
@@ -65,6 +65,7 @@ class CLIArgParser(object):
parser.add_argument("--dynsecents", action='store_true', help="dynamic section entries", default=False)
parser.add_argument("--reladyn", action='store_true', help=".rela.dyn entries", default=False)
parser.add_argument("--relaplt", action='store_true', help=".rela.plt entries", default=False)
+ parser.add_argument("--rodata", action='store_true', help="dump .rodata", default=False)
self.args = parser.parse_args()
if self.args.obj is None:
raise Exception("no object file provided. please specify an object with --obj.")
@@ -716,6 +717,7 @@ class ELF(object):
self.rela_dyn_ents = []
self.rela_plt = []
self.rela_plt_ents = []
+ self.rodata = []
def init(self, size):
self.size = size
@@ -1251,6 +1253,12 @@ def elf_get_text_section():
elf.init(64)
return elf.dump_section(".text", False)
+def elf_get_rodata_section():
+ so = openSO_r(sys.argv[1])
+ elf = ELF(so)
+ elf.init(64)
+ return elf.dump_section(".rodata", False)
+
# obj here means variables or what the C standard means by objects
def elf_get_obj_names():
so = openSO_r(sys.argv[1])