[PATCH v1] Fix wrong auxtype for storage class warning in AIX.
Aditya Vidyadhar Kamath <[email protected]> Tue, 4 Aug 2026 12:15:08 +0530
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
From: Aditya Kamath <[email protected]> In AIX when we debug a 64 bit binary we get, warning: BFD: /usr/lib/libc.a(/usr/lib/libc.a(_shr_64.o)): wrong auxtype 0xff for storage class 0x6b as shown below. (gdb) b main Breakpoint 1 at 0x1000008bc: file /tmp/inline_test/test_inline2.c, line 12. (gdb) r Starting program: /tmp/inline_test/test2_openxl warning: BFD: /usr/lib/libc.a(/usr/lib/libc.a(_shr_64.o)): wrong auxtype 0xff for storage class 0x6b warning: BFD: /usr/lib/libc.a(/usr/lib/libc.a(_shr_64.o)): wrong auxtype 0xff for storage class 0x2 Breakpoint 1, main () at /tmp/inline_test/test_inline2.c:12 12 volatile int x = 10, y = 20; (gdb) q 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 BFD does not need to parse its payload. --- bfd/coff64-rs6000.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index 8d558bdc0d2..d23c5d92541 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -425,9 +425,14 @@ _bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type ATTRIBUTE_UNUSED, } else { - /* It can also be a _AUX_EXCEPT entry. But it's not supported - for now. */ auxtype = H_GET_8 (abfd, ext->x_fcn.x_auxtype); + if (auxtype == _AUX_EXCEPT) + { + /* Exception-info auxiliary entry: skip it silently. XLC + emits these for functions that have exception tables; BFD + does not need to interpret the payload. */ + break; + } if (auxtype != _AUX_FCN) goto error; -- 2.51.2