Spaces:
Sleeping
Sleeping
Commit ·
b639ecc
1
Parent(s): f7b1854
switch
Browse files
main.py
CHANGED
|
@@ -76,12 +76,12 @@ def compile(compiler, flags, source):
|
|
| 76 |
disassembly = trim_objdump(disassembly)
|
| 77 |
|
| 78 |
# Relocs
|
| 79 |
-
relocs = subprocess.run(
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
).stdout
|
| 84 |
-
relocs = trim(relocs, 3)
|
| 85 |
|
| 86 |
json_relocs = subprocess.run(
|
| 87 |
["llvm-readobj-19", "--elf-output-style=JSON", "--relocations", temp_o_file_name],
|
|
@@ -91,7 +91,7 @@ def compile(compiler, flags, source):
|
|
| 91 |
json_relocs = json.loads(json_relocs)
|
| 92 |
|
| 93 |
if result.returncode == 0:
|
| 94 |
-
return
|
| 95 |
else:
|
| 96 |
return None, None, compile_output, disassembly
|
| 97 |
|
|
|
|
| 76 |
disassembly = trim_objdump(disassembly)
|
| 77 |
|
| 78 |
# Relocs
|
| 79 |
+
# relocs = subprocess.run(
|
| 80 |
+
# ["objdump", "-r", temp_o_file_name],
|
| 81 |
+
# capture_output=True,
|
| 82 |
+
# text=True
|
| 83 |
+
# ).stdout
|
| 84 |
+
# relocs = trim(relocs, 3)
|
| 85 |
|
| 86 |
json_relocs = subprocess.run(
|
| 87 |
["llvm-readobj-19", "--elf-output-style=JSON", "--relocations", temp_o_file_name],
|
|
|
|
| 91 |
json_relocs = json.loads(json_relocs)
|
| 92 |
|
| 93 |
if result.returncode == 0:
|
| 94 |
+
return json_relocs, compiled_bytes, compile_output, disassembly
|
| 95 |
else:
|
| 96 |
return None, None, compile_output, disassembly
|
| 97 |
|