Skip to content
Benedikt Geßele edited this page Apr 17, 2015 · 1 revision

Name

semantics-opt - command line tool that invokes a GDSL decoder, semantic translator, and optimizer

Synopsis

semantics-opt [--elf] [--offset offset] [--length length] [--preserve everywhere|block|context] --file file

Description

The semantics-opt tool reads machine instructions from a file and calls GDSL decoding and translation functions in order to decode and translate them. The user may either specify the byte range of the file to process manually or use an ELF file (in this case the instructions are taken from the .text section). After the translation, the resulting RReil code is optimized. The user is able so specify the extend to which the semantics of the code is preserved.

Command Line Options

Option Description
--elf assume ELF as input file format
--offset offset use offset as byte offset into the input file
--length length decode length many bytes
--preserve level use the semantics preservation level level; see below
--file file the path to the file to work with

Preservation Levels

Level Effect
everywhere the semantics of the original code is preserved everywhere - each machine instruction directly corresponds to a block of RReil statements
block the semantics of the original code is preserved on a basic block level
context the semantics of the original code is preserved on a complete program level