Skip to content

tool bugfix: remove windows CRLFs from squashelf output - #850

Open
bigbrett wants to merge 1 commit into
wolfSSL:masterfrom
bigbrett:squashelf-windows-fix
Open

tool bugfix: remove windows CRLFs from squashelf output#850
bigbrett wants to merge 1 commit into
wolfSSL:masterfrom
bigbrett:squashelf-windows-fix

Conversation

@bigbrett

@bigbrett bigbrett commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Fixes bug in squashelf (optional elf preprocessing tool to strip unused sections) where CRLFs were added to output elf sections when run on msys2/windows due to windows CRT opening file in "text" mode

@bigbrett bigbrett self-assigned this Aug 11, 2026
Copilot AI lite review requested due to automatic review settings August 11, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a Windows/MSYS2-specific corruption issue in the squashelf host tool where binary ELF input/output could be altered by CRLF translation when file descriptors are opened in text mode.

Changes:

  • Define O_BINARY as a no-op on platforms where it isn’t available.
  • Open both the input ELF and output ELF files with O_BINARY to force binary mode on Windows CRTs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bigbrett bigbrett assigned dgarske and unassigned bigbrett Aug 11, 2026
@bigbrett
bigbrett requested a review from dgarske August 11, 2026 16:04
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.

3 participants