36 Commits

Author SHA1 Message Date
rthomas
1364f22c78 Improve logging interface 2020-11-09 21:02:50 +01:00
Romain Thomas
7ff0859879 Fix terminal columns 2019-06-23 10:20:21 +02:00
Cédric Tessier
9fc3a8a433 Add coredump support in LIEF 2019-04-18 07:17:46 +02:00
Romain Thomas
8d7ec26a93 Add ELF ABI Version 2018-12-30 20:27:53 +01:00
Romain Thomas
decb8621f8 Enhancement 2018-10-01 10:40:58 +02:00
Romain Thomas
b5a08463ad Expose API to list functions found in a binary 2018-09-12 14:44:18 +02:00
Romain Thomas
2d603ede82 Move from fatal to error 2018-08-12 10:55:32 +02:00
Romain Thomas
02f4851c9f Return string located in the .rodata section
New API: lief.ELF.Binary.strings / LIEF::ELF::Binary::strings()
2018-07-27 10:56:41 +02:00
Romain Thomas
16595316fd Enable write on Fat Mach-O 2018-07-16 13:32:00 +02:00
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
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
163cd3bcc9 Expose ELF relocation info 2018-06-06 14:13:07 +02:00
Romain Thomas
db26017872 Remove debug message 2018-04-23 09:37:41 +02:00
Romain Thomas
4ef839c3d8 Enhance BinaryStream Interface 2018-04-15 08:55:23 +02:00
Romain Thomas
df3d269e23 Enhance ELF symbols 2018-03-07 12:51:28 +01:00
Romain Thomas
d13db18214 Support the '.note.android.ident' section 2018-02-28 15:45:46 +01:00
Romain Thomas
9036a2405d Bug fix in dynamic symbols counting based on GnuHash
API Changes (ELF):

  * ELF::GnuHash::{check_bloom_filter, check_bucket, check}
2017-09-23 14:08:52 +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
de17260e87 Print addend in elf's reader 2017-08-28 07:18:52 +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
d70ef9ec2c Improve Enums for SEGMENT_FLAGS 2017-08-02 07:53:23 +02:00
Romain Thomas
2a9b156f99 Abstract PIE
Resolve: #71
2017-08-01 17:57:38 +02:00
Romain Thomas
754b8afa2b Add object (ELF::DynamicEntryFlags) for ELF's DT_FLAGS and DT_FLAGS_1 2017-08-01 15:22:01 +02:00
Romain Thomas
730d045e05 Enhance LIEF's ELF header
API Changes (Python / C++):
  * lief.ELF.Header.{arm_flags_list, mips_flags_list, ppc64_flags_list, hexagon_flags_list} - Added

In python, one can do:
`` if lief.ELF.ARM_EFLAGS.EABI_VER5 in lief.ELF.Header: ...``

In C++ we added:
  * LIEF::ELF::Header::has(ARM_EFLAGS, PPC64_EFLAGS, MIPS_EFLAGS...)
2017-08-01 09:35:55 +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
b9ccec798d Split symbols printing and print Import/Export 2017-07-18 10:31:47 +02:00
Romain Thomas
483b8dc2ea Parse relocations in ELF object file (Resolve #51)
New API:
  * lief.ELF.Binary.object_relocations - Object relocations
  * lief.ELF.Binary.relocations - All relocations(plt/got, dynamic, obj)
2017-07-11 20:09:19 +02:00
Romain Thomas
ba9be1f63f Handle exceptions 2017-07-07 16:25:14 +02:00
Romain Thomas
25b9985c80 Add relocation size 2017-06-28 17:45:32 +02:00
Romain Thomas
c44a975913 Enhance 'macho_reader.py' 2017-06-23 21:37:23 +02:00
Romain Thomas
37cd8aa3cc Resolve #36 2017-06-11 15:26:42 +02:00
Romain Thomas
d9c6b436b5 Parse ELF notes (resolve #35) 2017-06-11 11:00:41 +02:00
Romain Thomas
77d43f9db4 Fully handle section-less ELF binaries
* Fix #25
  * ELF `tiny` binaries are now handled (see #7)
  * Computation of dynamic symbols can be done with differents methods:
    hash table, sections and relocations. (See LIEF::ELF::DYNSYM_COUNT_METHODS)
  * ELF parser can be configured to use one of the DYNSYM_COUNT_METHODS
  * Improve tests
2017-05-06 16:18:02 +02:00
Romain Thomas
babf69240b Don't use section's entry size to compute the number of symbols 2017-04-04 16:58:14 +02:00
Romain Thomas
306a191a03 First public release 2017-03-30 16:56:49 +02:00