binutils Newspaper
JUNE 15, 2026
rfc Proposed

RFC: Annotate immediates in x86 disassembly

Fixes a testsuite error in x86-64 mode by defining the `exe` variable.

This patch addresses an error encountered when running the binutils testsuite in x86-64 mode. The error arises because the exe variable, representing the executable extension, is not defined in the x86-64.exp test script. The patch resolves this by explicitly setting exe using [exeext], ensuring the testsuite functions correctly in x86-64 environments. The change restores the functionality of the testsuite.

In the Thread 4 participants
  1. Nick Clifton other

    Reports an error in the testsuite due to an undefined `exe` variable.

    “For me the use of the global "exe" in test_objdump_M_annotate is a problem when running the testsuite with RUNTESTFLAGS=x86-64.exp: ERROR: can't read "exe": no such variable”
  2. Maciej W. Rozycki contributor

    Suggests setting the `exe` variable using `[exeext]`.

    “You just need: set exe [exeext]”
  3. Nick Clifton other

    Confirms the suggested solution works.

    “Thanks Maciej. I am happy with either solution. Jan - can you confirm that one or both work, and do you have a preference ?”
  4. Jan Beulich <jbeulich@suse.com> proposer

    Confirms the solution and indicates the patch will be committed.

    “Maciej's works and is in line with what some parent dir *.exp also do. I guess I'll commit the patch below right away.”

Technical Tradeoffs

  • Adds a variable definition to a test script to resolve an error.

In Details

The binutils testsuite uses .exp files to define tests. These files use Tcl scripting. The x86-64/x86-64.exp script runs tests specific to the x86-64 architecture. The exeext variable provides the executable extension for the host system. This patch ensures that the exe variable is defined correctly in the test script.

For Context

Binutils is a collection of tools for working with binary files, including assemblers, linkers, and debuggers. Its functionality is validated by a testsuite. The testsuite uses scripts to automate the execution of tests and compare the results against expected outputs. This patch addresses a specific error related to the executable extension within the x86-64 test environment, ensuring the testsuite runs correctly.

Filed Under: binutilstestsuitex86-64Tclbuild fix