binutils Newspaper
OCTOBER 6, 2026
binutils — Proposed

Fix objdump --source-comment test on Windows

Fixes objdump test case failure on Windows due to path argument conversion.

A test case for objdump --source-comment is failing on Windows within the MSYS2 environment. This failure occurs because MSYS2 automatically converts Unix-style paths to Windows-style paths in command-line arguments, resulting in a single slash being passed to objdump instead of the expected double slash. This patch addresses the issue by conditionally excluding --source-comment= from this automatic conversion for Windows hosts.

In the Thread 1 participant
  1. Jan Dubiec <jdx@o2.pl> proposer

    Submits a patch to fix a failing objdump test case on Windows by preventing MSYS2 path conversion for the --source-comment argument.

    “This patch fixes the issue using the method described on the aforementioned page.”

In Details

This patch addresses a test suite failure in the binutils project on Windows, specifically for the objdump --source-comment test. The problem stems from MSYS2's automatic path conversion, which incorrectly modifies the argument intended for objdump. The fix involves temporarily disabling this conversion for the specific argument using the MSYS2_ARG_CONV_EXCL environment variable.

For Context
objdump
A GNU binary utilities program that displays information from object files, including disassembled code.
testsuite
A collection of tests designed to verify the correctness of a software system.
MSYS2
A software distribution and building platform for Windows, providing a Unix-like shell environment and package management.
path conversion
The process by which a system automatically modifies file paths, for example, converting Unix-style paths (e.g., /usr/bin) to Windows-style paths (e.g., C:\msys64\usr\bin).
MSYS2_ARG_CONV_EXCL
An environment variable used in MSYS2 to specify arguments that should be excluded from automatic path conversion.
Filed Under: binutilstestsuitewindowsobjdumpmsys2