Skip to content

Commit

Permalink
renovates the LLVM backend
Browse files Browse the repository at this point in the history
Droping support of old LLVM and legacy backends
-----------------------------------------------

We drop a lot of old code (minus 3k lines of code) thus removing the support
burden and making it easier to maintain, fix, and upgrade the code.

Fixes BinaryAnalysisPlatform#1166

Simplifies the implementation
-----------------------------

The remaining code base is significanly simplified. We dropped the
separation between relocatable and non-relocatable files, removed any
transformations of addresses from the LLVM backend (we now emit
absolute virtual addresses). The whole logic of transforming from the
llvm view to the bap image view now fits into a hundred lines of
code (instead of hundreds lines spread across 16 files as it was
before).

Fixes BinaryAnalysisPlatform#1183
Fixes BinaryAnalysisPlatform#1189

Produces more information
-------------------------------

The relocation information is now emitted for all files (not only for
relocatable). Also, removes tons of checks that were preventing our
backends from emitting valuable symbolic information.

Paves the road to BinaryAnalysisPlatform#1135 and BinaryAnalysisPlatform#1161
  • Loading branch information
ivg committed Aug 4, 2020
1 parent b3ff6a5 commit d1cc971
Show file tree
Hide file tree
Showing 42 changed files with 600 additions and 2,876 deletions.
3 changes: 2 additions & 1 deletion lib/bap_llvm/bap_llvm.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ module Std = struct

let llvm_version = strip_version Bap_llvm_config.version
let init_disassembler = Bap_llvm_disasm.init
let init_loader = Bap_llvm_ogre_loader.init
let init_loader ?base ?pdb_path () =
ok_exn @@ Bap_llvm_loader.init ?base ?pdb_path ()
end
68 changes: 0 additions & 68 deletions lib/bap_llvm/bap_llvm_binary.ml

This file was deleted.

14 changes: 0 additions & 14 deletions lib/bap_llvm/bap_llvm_coff_scheme.ml

This file was deleted.

27 changes: 0 additions & 27 deletions lib/bap_llvm/bap_llvm_elf_scheme.ml

This file was deleted.

Loading

0 comments on commit d1cc971

Please sign in to comment.