Skip to content

RelView: segments have no file backing, so no functions are created #24

Description

@xusheng6

Split out of #17. With the len() crash fixed, RelView creates its segment but still ends up with 0 functions:

Analysis error: Attempting to add function not backed by file: 0x37

init() calls add_auto_segment(addr, size, 0, 0, ...) — data length 0, so the segment is not backed by the file and Binary Ninja will not place functions in it.

The .rel format is textual, so the code bytes come from T records rather than a contiguous file region. Backing the segment with the file directly (add_auto_segment(addr, size, 0, size, ...)) is not a fix: self.write() then modifies the parent view, and the next load attempt dies with UnicodeDecodeError when re-parsing what is supposed to be text.

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