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 the --target parameter to disassemble and compare commands #1276

Merged
merged 1 commit into from
Feb 23, 2021

Conversation

ivg
Copy link
Member

@ivg ivg commented Feb 23, 2021

The target command-line parameter specializes (refines) the target
architecture of the disassembled binary, in order to specify abi,
fabi, and other target-specific parameters.

If the specified target is less specific than the binarie's target
then it will be ignored, if it is incompatible then an error will
occur.

Example, arm-linux-gnueabi-echo binary from testsuite/bin is a
binary built for bap:armv5+le, so we can refine it by adding an
application profile and floating-points (see bap list targets for
the full list of targets),

$ bap bin/arm-linux-gnueabi-echo --target=armv7-a+fp+le

At the same time if we will try to specify amd64 or even an arm
but that is not derived from armv5+le, we will get an error, e.g.,

$ bap bin/arm-linux-gnueabi-echo --target=armv7-a+fp+eb
Failed to build the project: the derived target bap:armv5+le is incompatible
with the user-specified target bap:armv7-a+fp+eb.

The target command-line parameter specializes (refines) the target
architecture of the disassembled binary, in order to specify abi,
fabi, and other target-specific parameters.

If the specified target is less specific than the binarie's target
then it will be ignored, if it is incompatible then an error will
occur.

Example, `arm-linux-gnueabi-echo` binary from `testsuite/bin` is a
binary built for bap:armv5+le, so we can refine it by adding an
application profile and floating-points (see `bap list targets` for
the full list of targets),

```
$ bap bin/arm-linux-gnueabi-echo --target=armv7-a+fp+le
```

At the same time if we will try to specify `amd64` or even an arm
but that is not derived from `armv5+le`, we will get an error, e.g.,

```
$ bap bin/arm-linux-gnueabi-echo --target=armv7-a+fp+eb
Failed to build the project: the derived target bap:armv5+le is incompatible
with the user-specified target bap:armv7-a+fp+eb.
```
@ivg ivg merged commit eab07d4 into BinaryAnalysisPlatform:master Feb 23, 2021
@ivg ivg deleted the add-the-target-option branch December 1, 2021 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant