Skip to content

winrpath: Ensure pe parsing can handle binaries built for 32 or 64 bit#42

Merged
scheibelp merged 1 commit into
spack:mainfrom
johnwparent:handle-32-64-bit-better
May 29, 2026
Merged

winrpath: Ensure pe parsing can handle binaries built for 32 or 64 bit#42
scheibelp merged 1 commit into
spack:mainfrom
johnwparent:handle-32-64-bit-better

Conversation

@johnwparent
Copy link
Copy Markdown
Collaborator

Some of the headers I was using to parse the PE files were macros that defaulted to either 32 or 64 bit structs based on compiler flags. This is incorrect behavior as we need to be parsing with structs that are compatible with the PE file being parsed not the compiler wrapper. Switch the parsing logic to avoid the use of there headers and check the bitness of the binary when extracting RVAs and import table locations.

Signed-off-by: John Parent <john.parent@kitware.com>
@scheibelp scheibelp merged commit f7ad38f into spack:main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants