19 Commits

Author SHA1 Message Date
Romain Thomas
778763de88 Fix Python return value policy for `get_symbol()`
Resolve #305
2019-06-23 10:19:14 +02:00
Romain Thomas
b5a08463ad Expose API to list functions found in a binary 2018-09-12 14:44:18 +02:00
Romain Thomas
918438c6be Enable to remove sections using the abstract layer 2018-07-09 15:08:39 +02:00
Romain Thomas
67d924a220 Add constructor functions in the abstract layer
New API:
  * LIEF::ELF::Binary::get_relocation
  * LIEF::Binary::ctor_functions
2018-06-19 15:27:35 +02:00
Romain Thomas
6676d6c91d Fix typo 2018-03-27 21:26:52 +02:00
Romain Thomas
5a6448c00d Explicit is better than implicit:
Add api to specify if the virtual address given to
LIEF::Binary::patch_address or
LIEF::Binary::get_content_from_virtual_address
is relative or absolute
2018-03-27 15:36:08 +02:00
Romain Thomas
3b17aba10e Refactor some parts of the Architecture:
* JSON visitor are located in the format namespace
  * Visitor are *real* visitor
  * Visitable class has been renamed to Object
  * Due to a bug in Visual Studio 2015, we move to VS2017
2018-03-13 16:49:02 +01:00
Romain Thomas
5778bae34c Use Pybind11 C++ API instead of 'eval' 2017-11-01 16:38:03 +01:00
Romain Thomas
a4c69f7868 Rename getter from get_XXX to XXX
related to #66
2017-09-07 14:45:41 +02:00
Romain Thomas
9503f2fc7b Add relocation in the Abstract layer
The abstracted attributes are:
  * Address: virtual address where the relocation occurs
  * Size: size in bits of the relocation

See: LIEF::Relocation / lief.Relocation and abstract_reader

Resolve: #53
2017-09-05 22:00:31 +02:00
Romain Thomas
b94900ca7f Improve the ELF part of LIEF
Major changes (features):
  * Enable adding multiple sections/segments - Executable (PIE or not), Library
  * Enable adding multiple dynamic entries (DT_NEEDED, DT_INIT etc)
  * Enable adding multiple relocations
  * Enable adding multiple dynamic symbols
  * Enable segment replacement

Major changes (API):
  * Getters Binary::get_*name*() has been renamed to "name()"
  * Binary::add(const DynamicEntry& entry) - To add an entry in the dynamic table
  * Section& Binary::add(const Section& section, bool loaded = true) - To add a section(s)
  * Segment& Binary::add(const Segment& segment, uint64_t base = 0) - To add segments
  * Segment& replace(const Segment& new_segment, const Segment& original_segment, uint64_t base = 0)
  * Binary's last_offset_section(), last_offset_segment(), next_virtual_address()
    to have information about offset
  * Binary's add_library(), get_library(), has_library() to handle
    DT_NEEDED entries

Other changes:
  * Binary::insert_content() - Use add(const Section&) or add(const Segment&) instead
  * ELF's DataHandler has been cleaned
  * Through LIEF::Section one can look for integers, strings, data
    within the section (see LIEF::Section::search,
    LIEF::Section::search_all)
  * Through LIEF::Binary one can get *xref* of a number (or address)
    see LIEF::Binary::xref function
  * To access to the Abstract binary in Python, one can now use
    the 'abstract' attribute. (e.g. binary.abstract.header.is_32)

Resolve: #83
Resolve: #66
Resolve: #48
2017-09-02 08:54:54 +02:00
Romain Thomas
07138549a4 Improve Python API to access to the binary Abstract layer 2017-08-30 09:51:03 +02:00
Romain Thomas
3204ba512a Fix encoding issues
Resolve: #85
2017-08-26 21:21:27 +02:00
Romain Thomas
f121af5ca6 Add API to get symbol by name (abstract layer)
API Changes (Python/C++):
  LIEF::Binary::has_symbol
  LIEF::Binary::get_symbol

It works for ELF, PE, MachO
2017-08-22 09:47:29 +02:00
Romain Thomas
8caf1515cb Add 'NX' in the abstract layer
API Changes:
  - LIEF::Binary::has_nx() - Added

Resolve: #72
2017-08-02 09:23:55 +02:00
Romain Thomas
2a9b156f99 Abstract PIE
Resolve: #71
2017-08-01 17:57:38 +02:00
Romain Thomas
9391238f11 Add the underlying executable format in the abstract layer
API changes (Python/C++):
  * lief.Binary.format
  * LIEF::ELF::Binary::format()
2017-07-22 08:23:17 +02:00
Romain Thomas
c0bb618307 Update doc 2017-07-01 18:35:10 +02:00
Romain Thomas
306a191a03 First public release 2017-03-30 16:56:49 +02:00