Skip to content

Commit

Permalink
original bap 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pakt committed Sep 20, 2012
1 parent ff55c7f commit 5cd9a09
Show file tree
Hide file tree
Showing 1,117 changed files with 789,330 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bap-0.4/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
The following currently work on BAP:
Ivan Jager
David Brumley
Thanassis Avgerinos
Edward Schwartz
JongHyup Lee

The original version of BAP was called VINE. VINE developers included:
David Brumley
Juan Caballero
Cody Hartwig
Ivan Jager
Eric Li
James Newsome
Pongsin Poosankam
Heng Yin
13 changes: 13 additions & 0 deletions bap-0.4/BIGINT
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This version of BAP includes a stripped down version of ocaml 3.12.
This is because the big int implementation in ML prior to version 3.12
did not include shifts. Rather than make everyone upgrade, we'll just
build the newer big int implementation and use that until most people
can easily upgrade to 3.12. We also include a version of batteries
that builds using this big int implementation, rather than using the
user's version.

We do need to keep a good chunk of the ocaml build system around.
This is because the big int implementation will build optimized
versions (e.g., in assembly) for different architectures. The logic
for this is in the configure/Make scripts, so we can't just get rid of
them entirely.
33 changes: 33 additions & 0 deletions bap-0.4/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This directory and it's children contain BAP, the Binary Analysis Platform.

Copyright © 2009 Carnegie-Mellon University, David Brumley, and Ivan Jager.

This library is made available under a dual licensing scheme.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
USA

Linking BAP statically or dynamically with other modules is making a
combined work based on BAP. Thus, the terms and conditions of the GNU
General Public License cover the whole combination.


For any other uses of BAP, you must first obtain a commercial
license. Please contact [email protected] for information about
commercial licensing.


VEX/ contains LibVEX. See VEX/LICENSE.README for copyright information on
LibVEX.
Empty file added bap-0.4/ChangeLog
Empty file.
104 changes: 104 additions & 0 deletions bap-0.4/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

*** Basic installation ****

Note: we primarily build bap on 64-bit Debian Lenny. It will
likely also work on ubuntu and 32-bit systems.

To build BAP on x86, do the following:
$ ./autogen.sh
$ ./configure
$ make
-- or to make all and run unit tests after --
$ make test

Configure should report any dependencies you do not have. You can
satisfy most dependencies on Ubuntu 11.04 by running:

$ sudo apt-get install ocaml ocaml-native-compilers ocaml-findlib camlidl \
libocamlgraph-ocaml-dev libextlib-ocaml-dev binutils-dev automake \
libcamomile-ocaml-dev otags libpcre3-dev camlp4-extra bison flex

On x86_64 add the following packages:
gcc-multilib g++-multilib

To compile the documentation, you also need
$ sudo aptitude install texlive-base texlive-latex-base \
texlive-latex-extra texlive-fonts-recommended

The following command will install build dependencies on Fedora Core 15:

$ sudo yum install ocaml ocaml-ocamlgraph ocaml-findlib \
ocaml-camlidl-devel ocaml-ocamlgraph-devel ocaml-extlib \
ocaml-camomile-devel ocaml-camomile-data \
ocaml-camlp4-devel automake binutils-devel gcc-c++

If you get an error that says there is an undefined reference to
'__stack_chk_fail', either you need to reconfigure with gcc set to
disable stack protection, or you have compiled part of the code
with the stack protector and part without it, in which case you
might have to enable it to finish compilation.
You can enable/disable the stack protector in gcc in the following way:
Disable: ./configure CC="gcc -fno-stack-protector"
Enable: ./configure CC="gcc -fstack-protector"
Doing make clean first, will ensure that the whole platform gets
compiled with the same flag


*** Valgrind's VEX library ****

BAP requires Valgrind's VEX library. We have included a patched
version of the VEX library in this distribution. We have included
information on our patch under VEX/BAP.README. We recommend you use
the version of VEX that is included.

It is possible to use a different version of VEX. To do so, build
VEX, then use the --with-vex=<vex dir> configure option.



*** Installing pin ***

The PIN trace tool is located in the pintraces/ directory. Because of licensing
reasons, we cannot distribute PIN with the trace tool. PIN must be extracted
inside of the traces directory; for instance, if the traces branch is located
in $PATH/traces, then PIN should be in $PATH/traces/pin. Running ./getpin.sh
from the $PATH/traces/pintraces directory will automatically download and
install PIN for Linux; the user is responsible for accepting the PIN license
agreements. On Windows, PIN must be downloaded and extracted by hand. The PIN
tool can be built by executing make in the $PATH/traces/experiemental directory.
On Windows, we reccomend using GNU Make for Windows
(https://gnuwin32.sourceforge.net/packages/make.htm) and Visual C++ 2010 express
(https://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express).
After compilation, the PIN tool should exist in
$PATH/traces/pintraces/obj-ia32/gentrace.so (or gentrace.dll on Windows).



*** Optional: Making the documentation ***

Optionally you can also make the documentation by running: 'make doc'
in the ocaml directory. The documentation will be generated under
ocaml/doc/bap/. Note that ocaml documentation requires that the ocaml
source files be built properly first.

We have also provided a command line to view the ocaml file
dependencies. Run:
$ make bap.dot
in the ocaml directory. The resulting file is a graphviz dot file
which can help you visualize how modules are related, e.g., run:
$ dot -Tpdf bap.dot > bap.pdf
$ xpdf bap.pdf



*** Optional: Making unit tests ***

Make tests:
$ make tests
-- or --
$ cd tests && make

Run tests:
$ cd tests && ./bap_test_suite
-- or for verbose test output --
$ cd tests && ./bap_test_suite -verbose
Loading

0 comments on commit 5cd9a09

Please sign in to comment.