yyHc d Z ddlZddlZddlZddlmZmZmZ G d de Z G d dej
Z G d d ej
Z G d
dej
Z
G d d
ZdS )a;
ELF file parser.
This provides a class ``ELFFile`` that parses an ELF executable in a similar
interface to ``ZipFile``. Only the read interface is implemented.
Based on: https://gist.github.com/lyssdod/f51579ae8d93c8657a5564aefc2ffbca
ELF header: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eheader.html
N)IOOptionalTuplec e Zd ZdS )
ELFInvalidN)__name__
__module____qualname__ d/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/packaging/_elffile.pyr r s Dr r c e Zd ZdZdZdS )EIClass N)r r r
C32C64r r r
r r
C
CCCr r c e Zd ZdZdZdS )EIDatar r N)r r r
LsbMsbr r r
r r r r r c " e Zd ZdZdZdZdZdZdS )EMachine ( > N)r r r
I386S390ArmX8664AArc64r r r
r r s' D
D
CE
FFFr r c v e Zd ZdZdee ddfdZdedee df fdZ
edee fd Z
dS )
ELFFilez.
Representation of an ELF executable.
freturnNc
|| _ | d }n"# t j $ r t d w xY wt |d d }|dk rt d| |d | _ |d | _ ddd d
d| j | j f \ }| _ | _ n.# t $ r! t d| j d
| j d w xY w | | \
}| _ }}| _ }| _
}| _ | _ d S # t j $ r}t d |d }~ww xY w)N16Bzunable to parse identification s ELFzinvalid magic: )z