From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19038 invoked by alias); 3 May 2011 09:45:32 -0000 Received: (qmail 19028 invoked by uid 22791); 3 May 2011 09:45:30 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,TW_CP X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 May 2011 09:45:16 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 55DA1CB0238; Tue, 3 May 2011 11:45:15 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gdn4ZZ57NWql; Tue, 3 May 2011 11:45:11 +0200 (CEST) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id B523ECB024D; Tue, 3 May 2011 11:45:05 +0200 (CEST) Subject: Re: [Patch]: complete coff/rs6000.h Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: Date: Tue, 03 May 2011 09:45:00 -0000 Cc: binutils Development Content-Transfer-Encoding: quoted-printable Message-Id: <4F01E9D2-D41D-4AEF-B6DC-94CE39A370BA@adacore.com> References: To: Richard Sandiford X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00034.txt.bz2 On May 3, 2011, at 10:35 AM, Richard Sandiford wrote: > x_ftype applies to both name encodings, so something like the syment > definition would seem better. (That'd mean changing the bfd code too, > of course.) [...] > This part's OK though. Please add the corresponding 64-bit definition > to rs6k64.h while you're there, to keep the two in sync. Thank you for the review. Here is the updated version. Simply checked by rebuilding binutils. Ok for trunk ? Tristan. include/coff: 2011-04-28 Tristan Gingold * rs6000.h (union external_auxent): Add x_ftype field. (struct external_exceptab): New struct. (EXCEPTSZ): New macro. * rs6k64.h: (struct external_exceptab): New struct. (EXCEPTSZ): New macro. bfd/ 2011-04-28 Tristan Gingold =20=20=20=20 coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file. (bfd_xcoff_swap_aux_out): Ditto. diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index 41bec09..21da658 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -463,23 +463,23 @@ _bfd_xcoff_swap_aux_in (bfd *abfd, PTR ext1, int type= , int in_class, switch (in_class) { case C_FILE: - if (ext->x_file.x_fname[0] =3D=3D 0) + if (ext->x_file.x_n.x_fname[0] =3D=3D 0) { in->x_file.x_n.x_zeroes =3D 0; in->x_file.x_n.x_offset =3D - H_GET_32 (abfd, ext->x_file.x_n.x_offset); + H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset); } else { if (numaux > 1) { if (indx =3D=3D 0) - memcpy (in->x_file.x_fname, ext->x_file.x_fname, + memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, numaux * sizeof (AUXENT)); } else { - memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN); + memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN); } } goto end; @@ -578,12 +578,13 @@ _bfd_xcoff_swap_aux_out (bfd *abfd, PTR inp, int type= , int in_class, case C_FILE: if (in->x_file.x_fname[0] =3D=3D 0) { - H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes); - H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset); + H_PUT_32 (abfd, 0, ext->x_file.x_n.x_n.x_zeroes); + H_PUT_32 (abfd, in->x_file.x_n.x_offset, + ext->x_file.x_n.x_n.x_offset); } else { - memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN); + memcpy (ext->x_file.x_n.x_fname, in->x_file.x_fname, FILNMLEN); } goto end; =20 diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h index 960dd32..d5b2af2 100644 --- a/include/coff/rs6000.h +++ b/include/coff/rs6000.h @@ -168,13 +168,16 @@ union external_auxent { char x_tvndx[2]; /* tv index */ } x_sym; =20 - union { - char x_fname[E_FILNMLEN]; - struct { - char x_zeroes[4]; - char x_offset[4]; - } x_n; - } x_file; + struct { + union { + char x_fname[E_FILNMLEN]; + struct { + char x_zeroes[4]; + char x_offset[4]; + } x_n; + } x_n; + char x_ftype[1]; + } x_file; =20 struct { char x_scnlen[4]; /* section length */ @@ -276,3 +279,15 @@ struct external_ldrel }; =20 #define LDRELSZ (2 * 4 + 2 * 2) + +struct external_exceptab +{ + union { + bfd_byte e_symndx[4]; + bfd_byte e_paddr[4]; + } e_addr; + bfd_byte e_lang[1]; + bfd_byte e_reason[1]; +}; + +#define EXCEPTSZ (4 + 2) diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h index 516758b..ef91db4 100644 --- a/include/coff/rs6k64.h +++ b/include/coff/rs6k64.h @@ -259,3 +259,15 @@ struct external_ldrel }; =20 #define LDRELSZ (16) + +struct external_exceptab +{ + union { + bfd_byte e_symndx[4]; + bfd_byte e_paddr[8]; + } e_addr; + bfd_byte e_lang[1]; + bfd_byte e_reason[1]; +}; + +#define EXCEPTSZ (10)