Skip to content

Commit 93ee72c

Browse files
committed
BAP Platform
This PR introduces BAP as a platform. A significant amount of code is moved from the Bap.Std library into separate plugins and libraries, that can be installed separately. The plugin system is severely reimplemented. Here is the short list of changes, a detailed list will be added later to the `CHANGES.md`. - moved Regular library out of bap. - moved Graphlib from Bap. - made module's state storable - moved x86 from the library - moved ARM from the library - moved Dwarf and Elf from the library. - moved byteweight from the library. - moved traces from the library - rewrote disassembler level - add properties to insn - moved llvm to plugins - added caching framework - added printing framework - redesigned build system - reimplemented plugin framework - Current set of plugins: * emit-ida-script extract a python script from the project data type * dump-symbols dump symbol information as a list of blocks * arm provide ARM lifter * piqi-printers provides piqi serialization for main data types (BIL, IR) * phoenix output project information in a phoenix format * print print project in various formats * cache provide caching services * byteweight find function starts using Byteweight algorithm * x86 provide x86 lifter * llvm provide loader and disassembler * ida use ida to provide rooter, symbolizer and reconstructor * read-symbols read symbol information from file * elf-loader read ELF and DWARF formats in a pure OCaml Note: this PR doesn't update the documentation, it will be pushed later.
1 parent 963c6d0 commit 93ee72c

File tree

401 files changed

+12213
-10646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+12213
-10646
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@
2323
/setup.log
2424
/setup.ml
2525
META
26+
_oasis
27+
/bap_config.ml
28+
/man/bap-mc.1
29+
/man/bap-byteweight.1
30+
/man/bap.1
31+
/lib/bap_config/bap_config.ml

.merlin

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,29 @@ EXT ounit
55
FLG -short-paths
66
FLG -w -4-33-40-41-42-43-34-44
77

8-
PKG camlzip
98
PKG core_kernel
109
PKG fileutils
11-
PKG jsonm
12-
PKG ocamlbuild
13-
PKG ocamlgraph
14-
PKG uuidm
1510
PKG uri
1611

1712
B _build
1813
B _build/lib/bap
14+
B _build/lib/bap_types
15+
B _build/lib/bap_image
1916
B _build/lib/bap_disasm
17+
B _build/lib/bap_sema
18+
B _build/lib/bap_bundle
2019
B _build/lib/bap_dwarf
2120
B _build/lib/bap_elf
22-
B _build/lib/bap_future
23-
B _build/lib/bap_image
24-
B _build/lib/bap_sema
25-
B _build/lib/bap_trace
26-
B _build/lib/bap_types
27-
B _build/piqi
21+
B _build/lib/bap_plugins
22+
B _build/lib/text_tags
23+
B _build/lib/regular
24+
B _build/lib/graphlib
2825

2926
S lib/bap
30-
S lib/bap_disasm
27+
S lib/bap_bundle
3128
S lib/bap_dwarf
3229
S lib/bap_elf
33-
S lib/bap_future
34-
S lib/bap_image
35-
S lib/bap_sema
36-
S lib/bap_trace
37-
S lib/bap_types
38-
S piqi
39-
S lwt
30+
S lib/bap_plugins
31+
S lib/text_tags
32+
S lib/regular
33+
S lib/graphlib

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ language: c
22
install: wget https://raw.githubusercontent.com/ocaml/ocaml-travisci-skeleton/master/.travis-opam.sh
33
script: bash -ex .travis-opam.sh
44
sudo: false
5-
cache:
6-
directories:
7-
- $HOME/.opam
8-
before_cache:
9-
- rm -rf $HOME/.opam/log
105
addons:
116
apt:
127
sources:

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ all: setup.data
1818

1919
install: setup.data
2020
$(SETUP) -install $(BAPINSTALLFLAGS)
21+
sh tools/build_plugins.sh
2122

2223
uninstall: setup.data
2324
$(SETUP) -uninstall $(BAPUNINSTALLFLAGS)
2425

2526
reinstall: setup.data
26-
$(SETUP) -reinstall $(BAPREINSTALLFLAGS)
27+
make uninstall
28+
make install
2729

2830
clean: setup.data
2931
$(SETUP) -clean $(BAPCLEANFLAGS)

0 commit comments

Comments
 (0)