Skip to content

Commit 6c992bb

Browse files
committed
Check that the program is an ELF binary
1 parent d89d266 commit 6c992bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ghidra2dwarf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838

3939

4040
curr = getCurrentProgram()
41+
if curr.executableFormat != ElfLoader.ELF_NAME:
42+
print "Only ELF binaries are supported"
43+
exit(1)
4144
image_base = curr.imageBase.offset
4245
is_pie = curr.relocationTable.relocatable
4346
orig_base = ElfLoader.getElfOriginalImageBase(curr)

0 commit comments

Comments
 (0)