20 Commits

Author SHA1 Message Date
Romain Thomas
406115c8d0 Enhance Mach-O modification
* Add load command
  * Add sections
  * Add segments

Resolve #46 (partially)
2018-06-27 14:44:42 +02:00
Romain Thomas
cd1cc457cf Resolve #119 and enhance ELF Python bindings 2018-06-08 10:48:33 +02:00
Romain Thomas
30544b095b Fix #151 2018-03-20 17:37:31 +01: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
9125b146cd Disable lief logger by default and export C API for logger
C API Changes (Added):
  * lief_logging_disable
  * lief_logging_enable
  * lief_logging_set_level
  * lief_logging_set_verbose_level
2017-11-30 16:58:40 +01:00
Romain Thomas
3602643f5d Fix memory leaks in the MachO Python API and create FatBinary
API Changes:

LIEF::MachO::Parser won't return a 'std::vector' of MachO::Binary*
but a pointer to MachO::FatBinary object
It's a kind of wrapper on std::vector<MachO::Binary*>
2017-09-29 13:06:08 +02:00
Romain Thomas
fe6168d319 Add PE Import and ImportEntry in the C API
API Changes (C / PE):

  * Pe_Import_t      - Added
  * Pe_ImportEntry_t - Added
2017-09-24 11:27:37 +02:00
Romain Thomas
985d1249b7 Enhance automatic symbol counting 2017-09-24 08:57:29 +02:00
Romain Thomas
a4c69f7868 Rename getter from get_XXX to XXX
related to #66
2017-09-07 14:45:41 +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
66b4cd4550 Fix enums conflicts
Enums changes (C++/C):

ELF:
  * s/SECTION_TYPES/ELF_SECTION_TYPES/
  * s/SECTION_FLAGS/ELF_SECTION_FLAGS/
  * s/SYMBOL_TYPES/ELF_SYMBOL_TYPES/
  * s/SEGMENT_FLAGS/ELF_SEGMENT_FLAGS/

MachO:
  * s/SECTION_TYPES/MACHO_SECTION_TYPES/
  * s/SECTION_FLAGS/MACHO_SECTION_FLAGS/
  * s/SYMBOL_TYPES/MACHO_SYMBOL_TYPES/
  * s/SEGMENTS_FLAGS/MACHO_SEGMENTS_FLAGS/

PE:
  * s/SECTION_TYPES/PE_SECTION_TYPES/

Resolve #32
2017-08-21 09:23:40 +02:00
Romain Thomas
629d9aa090 Add C API for ELF's DynamicEntryFlags 2017-08-01 15:47:05 +02:00
Romain Thomas
20a5f666de Rename 'flag' to 'flags' (ELF's segment)
API changes:
  [C++]    LIEF::ELF::Segment::flag -> LIEF::ELF::Segment::flags
  [Python] lief.ELF.Segment.flag -> lief.ELF.Segment.flags

Resolve: #63
2017-07-25 07:56:21 +02:00
Romain Thomas
d96971b0c3 Rename 'sizeof_section_header' to 'section_header_size' (ELF's header)
API changes:
  [C]      Elf_Header_t.sizeof_section_header -> Elf_Header_t.section_header_size
  [C++]    LIEF::ELF::Header::sizeof_section_header -> LIEF::ELF::Header::section_header_size
  [Python] lief.ELF.sizeof_section_header -> lief.ELF.section_header_size

Resolve #62
2017-07-24 07:44:11 +02:00
Romain Thomas
31bdcc1f0c Fix missing headers 2017-07-18 11:12:49 +02:00
Romain Thomas
8c00dd25eb Add is_exported/is_imported functions in the C API
API changes (C):
  Elf_Symbol_t.{is_exported, is_imported} - Added
2017-07-18 11:04:05 +02:00
Romain Thomas
4f9a11ac4a Add is_elf in the C API 2017-07-18 11:00:35 +02:00
Jessy Campos
27c78a3715 Grouping src files and headers in order to display them correctly in VS Solution Explorer 2017-04-25 12:41:21 -04:00
Romain Thomas
d75fd098b9 Enclose paths within quotes (fix #9) 2017-04-05 15:33:18 +02:00
Romain Thomas
306a191a03 First public release 2017-03-30 16:56:49 +02:00