Binutils linker adds AIX after-allocation regression test for foreign inputs and retargeting.
New AIX regression test verifies linker behavior with foreign object files and retargeted outputs.
A new regression test has been added for the AIX linker emulations to verify its handling of foreign object files and retargeted outputs. The test links a fixed x86-64 relocatable object against AIX emulations, both directly and after retargeting the output to elf32-little. It ensures that these operations fail cleanly with the expected diagnostics and do not crash or produce invalid output files.
In Details
This commit introduces ld/testsuite/ld-powerpc/aix-retarget.exp, a regression test for AIX linker emulations. It tests the after_allocation phase's robustness when handling non-AIX object files (specifically x86-64 relocatable) and when retargeting the output format via linker script (OUTPUT_FORMAT elf32-little). The test suite embeds an x86-64 object to avoid host dependencies. It verifies that the linker exits with status 1 and provides the correct 'architecture mismatch' diagnostic when it cannot process the input or output format. This targets issues where the linker might crash or…
- after_allocation
- A phase in the linker's execution, occurring after memory sections have been allocated but before the final output is written.
- retargeting
- The process of changing the intended output file format or architecture of the linker, often specified via a linker script.
- relocatable object
- An object file containing code and data that can be modified by a linker to resolve external references and adjust addresses.
- AIX emulations
- Linker configurations within binutils designed to mimic the behavior of the AIX operating system's linker.