Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds an option to directly use ogre files as a loader #1392

Merged
merged 1 commit into from
Jan 6, 2022

Commits on Jan 5, 2022

  1. adds an option to directly use ogre files as a loader

    The feature is implemented directly in the `Image.create` function so
    that it can be used programmatically. The `backend` parameter can now
    accept an explicit file path instead of the loader name. The
    documentation of the `loader` command-line parameter is accordingly
    updated.
    
    To prevent clashes between existing loaders and filenames, only
    existing filenames with explicit paths are treated as ogre
    specifications, i.e., the path must start with `./`, `../`, or `/` in
    Unix.
    
    Example of usage,
    ```
    $ bap testsuite/bin/arm-linux-gnueabi-echo -dogre:echo.ogre -dbir | grep print_endline
    000007da: sub print_endline(print_endline_result)
    00000804: print_endline_result :: out u32 = R0
    0000031e: call @print_endline with return %00000320
    $ sed 's/print_endline/printl/g' echo.ogre > echo.mangled.ogre
    $ bap testsuite/bin/arm-linux-gnueabi-echo --loader=./echo.mangled.ogre -dbir | grep printl
    00000339: call @printl with return %0000033b
    000007df: sub printl(printl_result)
    00000807: printl_result :: out u32 = R0
    ```
    
    You can also use `bap specification ./exe` to obtain the initial OGRE
    specification for a file (without disassembling it) and the edit it to
    your taste. And, of course, you can write a specification from
    scratch.
    ivg committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    d3102b0 View commit details
    Browse the repository at this point in the history