Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Elf Viewer can't display ELF file with only section headers and no program headers #13

Copy link
Copy link
@zhuowei

Description

@zhuowei
Issue body actions

I have an ELF file that was converted from RPL (the Wii U's modified ELF format); when trying to view its information in Elf Viewer, I get a blank screen with the following error in the console:

Traceback (most recent call last):
  File "binja.py", line 803, in setView
    self.focus_tab.widget(self.focus_tab.currentIndex()).setViewType(type)
  File "/home/zhuowei/binaryninja-python/View.py", line 100, in setViewType
    view = self.createView(type)
  File "/home/zhuowei/binaryninja-python/View.py", line 84, in createView
    view = type(self.data, self.filename, self, self.main_area)
  File "/home/zhuowei/binaryninja-python/ElfFile.py", line 507, in __init__
    super(ElfViewer, self).__init__(view.exe, filename, view, parent)
  File "/home/zhuowei/binaryninja-python/HexEditor.py", line 61, in __init__
    self.status = "Cursor: 0x%.8x" % self.data.start()
TypeError: %x format: a number is required, not NoneType

I'm on Ubuntu 14.04 (32-bit) and using the latest version from the master branch.

The readelf output for the ELF file if that helps: https://gist.github.com/zhuowei/45d1eb080bc36dc34237

As one can see, there are no program headers in the file at all (RPLs are loaded through the section headers), so ElfFile.start() can't find a start address from the program headers and will return None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.