Commit
·
687083b
1
Parent(s):
a74a996
extract relocs
Browse files
main.py
CHANGED
@@ -89,6 +89,12 @@ def compile(compiler, flags, source):
|
|
89 |
text=True,
|
90 |
).stdout
|
91 |
json_relocs = json.loads(json_relocs)
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
if result.returncode == 0:
|
94 |
return json_relocs, compiled_bytes, compile_output, disassembly
|
|
|
89 |
text=True,
|
90 |
).stdout
|
91 |
json_relocs = json.loads(json_relocs)
|
92 |
+
json_relocs = json_relocs[0]["Relocations"]
|
93 |
+
def gen():
|
94 |
+
for d in json_relocs:
|
95 |
+
for r in d['Relocs']:
|
96 |
+
yield r['Relocation']
|
97 |
+
json_relocs = list(gen())
|
98 |
|
99 |
if result.returncode == 0:
|
100 |
return json_relocs, compiled_bytes, compile_output, disassembly
|