Re: [PATCH v1] Fix wrong auxtype for storage class warning in AIX.

Aditya Kamath via Binutils <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <LV8PR15MB648868E430C8A8634EC5CB5FD6A02@LV8PR15MB6488.namprd15.prod.outlook.com>
Hi everyone,

Kindly let me know if any feedback for this patch.

Thanks and regards,
Aditya.

From: Aditya Vidyadhar Kamath <[email protected]>
Date: Tuesday, 4 August 2026 at 12:15 PM
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; Aditya Kamath <[email protected]>; SANGAMESH MALLAYYA <[email protected]>
Subject: [EXTERNAL] [PATCH v1] Fix wrong auxtype for storage class warning in AIX.

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.