Commit Graph

12 Commits

Author SHA1 Message Date
Romain Thomas c91b7c2de1 Update code to ease Python stub files (related #650) 2023-02-04 08:45:40 +01:00
Romain Thomas 969411f8ef Welcome 2023 2023-01-03 10:38:09 +01:00
Romain Thomas 77328b0071 Bump year 2022-02-08 21:16:25 +01:00
rthomas a615adbee4 This commit cleans and modernizes the code base of LIEF.
Among the changes:

- It removes the ``and, or, not`` keywords
- It updates the Documentation
- It moves the internal structures in the ``details::`` namespace
2022-01-27 20:18:54 +01:00
Nicolas Iooss bb7faf3e72 Support setting ELF header identity from bytes
The following Python code currently fails with Python 3.9:

    import lief
    elf = lief.ELF.Binary("test", lief.ELF.ELF_CLASS.CLASS32)
    elf.header.identity = bytes.fromhex("7f454c46010101000000000000000000")

The reported error is:

    TypeError: b'\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00' is not supported!

It is possible to use `.decode()` to convert the bytes to string, or to
use `list(...)` to convert them to a list of integers. Both these
solutions work, but they are not as elegant as directly using `bytes`.

Modify the `identity` setter to support bytes. As `Header::identity_t`
is directly an array of `uint8_t`, casting it from `py::bytes` is
straightforward.
2022-01-24 23:18:20 +01:00
Romain Thomas 6720ed2385 Update copyright 2021-01-16 18:17:17 +01:00
Romain Thomas 8d7ec26a93 Add ELF ABI Version 2018-12-30 20:27:53 +01:00
Romain Thomas cd1cc457cf Resolve #119 and enhance ELF Python bindings 2018-06-08 10:48:33 +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 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 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 306a191a03 First public release 2017-03-30 16:56:49 +02:00