+
    SBi                         R t ^ RIt^ RIt^ RIt^ RIHtHtHt  ! R R]4      t	 ! R R]P                  4      t ! R R]P                  4      t ! R	 R
]P                  4      t ! R R4      tR# )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)IOOptionalTuplec                       ] tR t^tRtR# )
ELFInvalid N)__name__
__module____qualname____firstlineno____static_attributes__r       F/usr/lib/python3.14/site-packages/wheel/vendored/packaging/_elffile.pyr   r      s    r   r   c                       ] tR t^t^t^tRtR# )EIClassr   N)r   r	   r
   r   C32C64r   r   r   r   r   r          
C
Cr   r   c                       ] tR t^t^t^tRtR# )EIDatar   N)r   r	   r
   r   LsbMsbr   r   r   r   r   r      r   r   r   c                   *    ] tR t^t^t^t^(t^>t^tRt	R# )EMachiner   N)
r   r	   r
   r   I386S390ArmX8664AArc64r   r   r   r   r   r      s    DD
CEFr   r   c                   d   a  ] tR t^'t o RtV 3R lR ltV 3R lR lt]V 3R lR l4       tRt	V t
R	# )
ELFFilez&
Representation of an ELF executable.
c                4   < V ^8  d   QhRS[ S[,          RR/# )   freturnN)r   bytes)format__classdict__s   "r   __annotate__ELFFile.__annotate__,   s#     ,W ,W"U) ,W ,Wr   c           
        Wn          V P                  R 4      p\        TR,          4      pTR8w  d   \	        RT: 24      hT^,          T n        T^,          T n         R
RRRRRRR/T P                  T P                  3,          w  q@n        T n	         T P                  T4      w
  pT n        ppT n        pT n        pT n        T n        R	#   \        P                   d    \	        R4      hi ; i  \         d(    \	        RT P                   RT P                   R24      hi ; i  \        P                   d   p\	        R4      ThR	p?ii ; i)16Bzunable to parse identification:N   Ns   ELFzinvalid magic: zunrecognized capacity (z) or encoding ()z/unable to parse machine and section informationN)   r.   )z<HHIIIIIHHHz	<IIIIIIII    r.   r,   )r.   r"   )z>HHIIIIIHHHz	>IIIIIIIIr/   )r"   r.   )z<HHIQQQIHHHz	<IIQQQQQQr0   r"      )r"   r"   )z>HHIQQQIHHHz	>IIQQQQQQr1   )_f_readstructerrorr   r%   capacityencoding_p_fmt_p_idxKeyErrormachine_e_phoffflags_e_phentsize_e_phnum)selfr#   identmagice_fmt_es   &&     r   __init__ELFFile.__init__,   sg   	?JJu%E eBi Jui899aa	
 ????	/
 }}dmm,/.+E;	W 

5!
!I || 	?=>>	?&  	)$-- 9!]]O1. 	& || 	WNOUVV	Ws/   C
 4C. 5D# 
!C+.2D #E	8EE	c                :   < V ^8  d   QhRS[ RS[S[R3,          /# )r"   fmtr$   .)strr   int)r&   r'   s   "r   r(   r)   Z   s'     F F FsCx Fr   c                    \         P                  ! WP                  P                  \         P                  ! V4      4      4      # )N)r5   unpackr3   readcalcsize)rA   rJ   s   &&r   r4   ELFFile._readZ   s'    }}S'',,vs/C"DEEr   c                0   < V ^8  d   QhRS[ S[,          /# )r"   r$   )r   rK   )r&   r'   s   "r   r(   r)   ^   s      Xc] r   c                z   \        V P                  4       EF  pV P                  P                  V P                  V P
                  V,          ,           4        V P                  V P                  4      pY P                  ^ ,          ,          ^8w  d   K}  T P                  P                  Y P                  ^,          ,          4       \        P                  ! T P                  P                  Y P                  ^,          ,          4      4      P                  R4      u # 	  R#   \        P                   d     EK#  i ; i)z8
The path recorded in the ``PT_INTERP`` section header.
 N)ranger@   r3   seekr=   r?   r4   r9   r5   r6   r:   osfsdecoderO   strip)rA   indexdatas   &  r   interpreterELFFile.interpreter]   s    
 4==)EGGLL):):U)BBCzz$++. KKN#q(GGLLkk!n-.;;tww||DQ,@ABHHNN *  << s   D  D:9D:)
r?   r@   r=   r3   r9   r:   r7   r8   r>   r<   N)r   r	   r
   r   __doc__rG   r4   propertyr\   r   __classdictcell__)r'   s   @r   r    r    '   s7     ,W ,W\F F  r   r    )r^   enumrW   r5   typingr   r   r   
ValueErrorr   IntEnumr   r   r   r    r   r   r   <module>re      sc     	  & &	 	dll 
T\\ 
t|| E Er   