AIX: Fix wrong auxtype for storage class warning
Resolves a spurious warning in BFD when processing AIX 64-bit binaries with `_AUX_EXCEPT` aux types.
This patch addresses a warning message in BFD related to AIX 64-bit binaries: ‘warning: BFD: …: wrong auxtype 0xff for storage class 0x6b’. This warning occurs because the _bfd_xcoff64_swap_aux_in() function in BFD incorrectly flags _AUX_EXCEPT aux entries as an error when they are encountered for non-last auxiliary entries. The fix modifies the function to recognize and silently skip _AUX_EXCEPT entries, as their payload is not needed by BFD, thus eliminating the spurious warning.
- proposer
Submits a patch to fix a warning related to `_AUX_EXCEPT` aux types in AIX 64-bit binaries.
“The openXL compiled binary or library in AIX emits _AUX_EXCEPT (auxtype 0xff) auxillary entry for C_EXT and C_HIDEXT symbols which are functions that have exception tables. BFD's _bfd_xcoff64_swap_aux_in() only accepted _AUX_FCN for non-last aux entries and jumped to error: for anything else triggering the spurious warning. The fix detects _AUX_EXCEPT first and silently skips it with break, since…”
- reviewer
Receives the patch for review.
Technical Tradeoffs
- Fixes a spurious warning, improving user experience during debugging.
- Adds a specific check for `_AUX_EXCEPT`, which is not strictly necessary for BFD's operation but resolves the false positive.
In Details
This patch targets bfd/coff64-rs6000.c and specifically the _bfd_xcoff64_swap_aux_in function, which parses auxiliary entries in AIX XCOFF64 object files. The issue arises when symbols have _AUX_EXCEPT aux entries (indicating exception tables), which are used by compilers like openXL. The current BFD logic only handles _AUX_FCN for non-last aux entries and errors out on others, leading to a spurious warning. The fix adds a specific check for _AUX_EXCEPT to silently skip it, as BFD does not need to process its contents.
- AIX
- Advanced Interactive eXecutive, a proprietary Unix operating system developed by IBM.
- BFD
- Binary File Descriptor library, a component of GNU Binutils that provides a common interface for reading and writing various executable file formats.
- auxtype
- Auxiliary type, a field within an XCOFF (Extended Common Object File Format) symbol table entry that provides additional information about the symbol.
- storage class
- A concept in some object file formats (like XCOFF) that describes the storage attributes of a symbol.
- XCOFF
- Extended Common Object File Format, a file format used by IBM for AIX and other systems.
- _AUX_EXCEPT
- A specific auxiliary type in XCOFF indicating that a symbol has an associated exception table.