mbox series

[v2,0/4] pmdinfogen: support Windows

Message ID 20210108024723.26210-1-dmitry.kozliuk@gmail.com (mailing list archive)
Headers show
Series pmdinfogen: support Windows | expand

Message

Dmitry Kozlyuk Jan. 8, 2021, 2:47 a.m. UTC
Based on Python version of pmdinfogen, deferred until 21.02:

    http://patchwork.dpdk.org/project/dpdk/list/?series=13153

There are a few Python libraries for PE/COFF, none of which suits the need,
so a custom COFF parser is used.  Advice is welcome, options considered:

* py-coff (https://github.com/jeppeter/py-coff): doesn't give access to
  symbol values, Python 2 code inside, not very popular.

* pefile (https://github.com/erocarrera/pefile): for PE (executables and
  libraries), not COFF (objects); most popular.

* pype32-py3 (https://github.com/crackinglandia/pype32): ditto, less popular.

A script to extract object files from library is still required. Meson has
extract_all_objects(), but they can't be passed as inputs to custom_target()
until 0.52.0 (commit f431cff809).

v2:
    Don't require elftools on Windows (Jie Zhou).

Dmitry Kozlyuk (4):
  pmdinfogen: support COFF
  pmdinfogen: allow multiple input files
  buildtools: support object file extraction for Windows
  build: enable pmdinfogen for Windows

 buildtools/coff.py              | 154 ++++++++++++++++++++++++++++++++
 buildtools/gen-pmdinfo-cfile.py |  19 ++++
 buildtools/gen-pmdinfo-cfile.sh |  14 ---
 buildtools/meson.build          |  15 +++-
 buildtools/pmdinfogen.py        | 135 +++++++++++++++++++++-------
 drivers/meson.build             |  26 +++---
 6 files changed, 301 insertions(+), 62 deletions(-)
 create mode 100644 buildtools/coff.py
 create mode 100644 buildtools/gen-pmdinfo-cfile.py
 delete mode 100755 buildtools/gen-pmdinfo-cfile.sh

Comments

Thomas Monjalon Jan. 25, 2021, 3:59 p.m. UTC | #1
08/01/2021 03:47, Dmitry Kozlyuk:
> Dmitry Kozlyuk (4):
>   pmdinfogen: support COFF
>   pmdinfogen: allow multiple input files
>   buildtools: support object file extraction for Windows
>   build: enable pmdinfogen for Windows

Applied, thanks.

Please follow-up on temporary file location.