* [Patch]: complete coff/rs6000.h
@ 2011-04-28 13:43 Tristan Gingold
2011-05-03 8:35 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-04-28 13:43 UTC (permalink / raw)
To: binutils Development
Hi,
this patch adds a couple of fields that are in the AIX doc but not in rs6000.h
Ok for trunk ?
Tristan.
include/coff:
2011-04-28 Tristan Gingold <gingold@adacore.com>
* rs6000.h (union external_auxent): Add x_ftype field.
(struct external_exceptab): New struct.
(EXCEPTSZ): New macro.
diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h
index 960dd32..f530a46 100644
--- a/include/coff/rs6000.h
+++ b/include/coff/rs6000.h
@@ -173,6 +173,8 @@ union external_auxent {
struct {
char x_zeroes[4];
char x_offset[4];
+ char x_pad[E_FILNMLEN - 8];
+ char x_ftype[1];
} x_n;
} x_file;
@@ -276,3 +278,12 @@ struct external_ldrel
};
#define LDRELSZ (2 * 4 + 2 * 2)
+
+struct external_exceptab
+{
+ bfd_byte e_addr[4];
+ bfd_byte e_lang[1];
+ bfd_byte e_reason[1];
+};
+
+#define EXCEPTSZ (4 + 2)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-04-28 13:43 [Patch]: complete coff/rs6000.h Tristan Gingold
@ 2011-05-03 8:35 ` Richard Sandiford
2011-05-03 9:45 ` Tristan Gingold
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2011-05-03 8:35 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils Development
Tristan Gingold <gingold@adacore.com> writes:
> @@ -173,6 +173,8 @@ union external_auxent {
> struct {
> char x_zeroes[4];
> char x_offset[4];
> + char x_pad[E_FILNMLEN - 8];
> + char x_ftype[1];
> } x_n;
> } x_file;
>
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.)
> @@ -276,3 +278,12 @@ struct external_ldrel
> };
>
> #define LDRELSZ (2 * 4 + 2 * 2)
> +
> +struct external_exceptab
> +{
> + bfd_byte e_addr[4];
> + bfd_byte e_lang[1];
> + bfd_byte e_reason[1];
> +};
> +
> +#define EXCEPTSZ (4 + 2)
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.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-05-03 8:35 ` Richard Sandiford
@ 2011-05-03 9:45 ` Tristan Gingold
2011-05-03 13:07 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-05-03 9:45 UTC (permalink / raw)
To: Richard Sandiford; +Cc: binutils Development
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 <gingold@adacore.com>
* 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 <gingold@adacore.com>
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] == 0)
+ if (ext->x_file.x_n.x_fname[0] == 0)
{
in->x_file.x_n.x_zeroes = 0;
in->x_file.x_n.x_offset =
- 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 == 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] == 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;
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;
- 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;
struct {
char x_scnlen[4]; /* section length */
@@ -276,3 +279,15 @@ struct external_ldrel
};
#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
};
#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)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-05-03 9:45 ` Tristan Gingold
@ 2011-05-03 13:07 ` Richard Sandiford
2011-05-04 7:17 ` Tristan Gingold
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2011-05-03 13:07 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils Development
Tristan Gingold <gingold@adacore.com> writes:
> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>
> * rs6000.h (union external_auxent): Add x_ftype field.
Please make r6k64.h match here too.
> (struct external_exceptab): New struct.
> (EXCEPTSZ): New macro.
> * rs6k64.h: (struct external_exceptab): New struct.
> (EXCEPTSZ): New macro.
This part's OK. Please install separately.
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-05-03 13:07 ` Richard Sandiford
@ 2011-05-04 7:17 ` Tristan Gingold
2011-05-04 9:40 ` Richard Sandiford
0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-05-04 7:17 UTC (permalink / raw)
To: Richard Sandiford; +Cc: binutils Development
On May 3, 2011, at 3:07 PM, Richard Sandiford wrote:
> Tristan Gingold <gingold@adacore.com> writes:
>> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>>
>> * rs6000.h (union external_auxent): Add x_ftype field.
>
> Please make r6k64.h match here too.
Done, see patch below.
Checked by rebuilding for powerpc64-ibm-aix6.1
>> (struct external_exceptab): New struct.
>> (EXCEPTSZ): New macro.
>> * rs6k64.h: (struct external_exceptab): New struct.
>> (EXCEPTSZ): New macro.
>
> This part's OK. Please install separately.
I have just installed it.
Tristan.
include/coff:
2011-04-28 Tristan Gingold <gingold@adacore.com>
* rs6000.h (union external_auxent): Add x_ftype field.
* rs6k64.h: (struct external_auxent): Remap x_file field.
bfd/
2011-04-28 Tristan Gingold <gingold@adacore.com>
coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
(bfd_xcoff_swap_aux_out): Ditto.
coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
(bfd_xcoff64_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] == 0)
+ if (ext->x_file.x_n.x_fname[0] == 0)
{
in->x_file.x_n.x_zeroes = 0;
in->x_file.x_n.x_offset =
- 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 == 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] == 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;
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index cb2f1cc..1887bb9 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -353,14 +353,15 @@ _bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type, int in_class,
switch (in_class)
{
case C_FILE:
- if (ext->x_file.x_n.x_zeroes[0] == 0)
+ if (ext->x_file.x_n.x_n.x_zeroes[0] == 0)
{
in->x_file.x_n.x_zeroes = 0;
- in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
+ in->x_file.x_n.x_offset =
+ H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset);
}
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;
@@ -444,12 +445,13 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type, int in_class,
case C_FILE:
if (in->x_file.x_n.x_zeroes == 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);
}
H_PUT_8 (abfd, _AUX_FILE, ext->x_auxtype.x_auxtype);
goto end;
diff --git a/include/coff/rs6000.h b/include/coff/rs6000.h
index c72e6e9..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;
- 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;
struct {
char x_scnlen[4]; /* section length */
diff --git a/include/coff/rs6k64.h b/include/coff/rs6k64.h
index ef91db4..453198a 100644
--- a/include/coff/rs6k64.h
+++ b/include/coff/rs6k64.h
@@ -152,15 +152,17 @@ union external_auxent
} x_fcnary;
} x_sym;
- union {
- char x_fname[E_FILNMLEN];
- struct {
- char x_zeroes[4];
- char x_offset[4];
- char x_pad[6];
- unsigned char x_ftype[1];
- unsigned char x_resv[2];
- } x_n;
+ struct {
+ union {
+ char x_fname[E_FILNMLEN];
+ struct {
+ char x_zeroes[4];
+ char x_offset[4];
+ char x_pad[6];
+ } x_n;
+ } x_n;
+ unsigned char x_ftype[1];
+ unsigned char x_resv[2];
} x_file;
struct {
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-05-04 7:17 ` Tristan Gingold
@ 2011-05-04 9:40 ` Richard Sandiford
2011-05-04 11:05 ` Tristan Gingold
0 siblings, 1 reply; 7+ messages in thread
From: Richard Sandiford @ 2011-05-04 9:40 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils Development
Tristan Gingold <gingold@adacore.com> writes:
> include/coff:
> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>
> * rs6000.h (union external_auxent): Add x_ftype field.
> * rs6k64.h: (struct external_auxent): Remap x_file field.
>
> bfd/
> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>
> coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
> (bfd_xcoff_swap_aux_out): Ditto.
> coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
> (bfd_xcoff64_swap_aux_out): Ditto.
OK, thanks. (Please add the missing '*'s to the changelog though.)
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch]: complete coff/rs6000.h
2011-05-04 9:40 ` Richard Sandiford
@ 2011-05-04 11:05 ` Tristan Gingold
0 siblings, 0 replies; 7+ messages in thread
From: Tristan Gingold @ 2011-05-04 11:05 UTC (permalink / raw)
To: Richard Sandiford; +Cc: binutils Development
On May 4, 2011, at 11:39 AM, Richard Sandiford wrote:
> Tristan Gingold <gingold@adacore.com> writes:
>> include/coff:
>> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>>
>> * rs6000.h (union external_auxent): Add x_ftype field.
>> * rs6k64.h: (struct external_auxent): Remap x_file field.
>>
>> bfd/
>> 2011-04-28 Tristan Gingold <gingold@adacore.com>
>>
>> coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
>> (bfd_xcoff_swap_aux_out): Ditto.
>> coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
>> (bfd_xcoff64_swap_aux_out): Ditto.
>
> OK, thanks. (Please add the missing '*'s to the changelog though.)
Done. Thank you for your patience.
Tristan.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-05-04 11:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-28 13:43 [Patch]: complete coff/rs6000.h Tristan Gingold
2011-05-03 8:35 ` Richard Sandiford
2011-05-03 9:45 ` Tristan Gingold
2011-05-03 13:07 ` Richard Sandiford
2011-05-04 7:17 ` Tristan Gingold
2011-05-04 9:40 ` Richard Sandiford
2011-05-04 11:05 ` Tristan Gingold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).