* som.c compilation errors
@ 2005-04-20 16:26 Jerome Guitton
2005-04-20 18:01 ` Mark Kettenis
0 siblings, 1 reply; 3+ messages in thread
From: Jerome Guitton @ 2005-04-20 16:26 UTC (permalink / raw)
To: mark.kettenis; +Cc: binutils
Hello Mark,
We are experimenting some problems your last modification to som.c. I mean,
this one:
http://sources.redhat.com/ml/binutils/2005-04/msg00455.html
This modification makes our builds fail on HP-UX 11.00 and 11.11:
@@ -5070,16 +5080,16 @@ som_bfd_print_private_bfd_data (bfd *abf
fprintf (f, "\n");
fprintf (f, " type %#x\n", auxhdr->type);
fprintf (f, " length %#x\n", auxhdr->length);
- fprintf (f, " text size %#x\n", exec_header->exec_tsize);
- fprintf (f, " text memory offset %#x\n", exec_header->exec_tmem);
- fprintf (f, " text file offset %#x\n", exec_header->exec_tfile);
- fprintf (f, " data size %#x\n", exec_header->exec_dsize);
- fprintf (f, " data memory offset %#x\n", exec_header->exec_dmem);
- fprintf (f, " data file offset %#x\n", exec_header->exec_dfile);
- fprintf (f, " bss size %#x\n", exec_header->exec_bsize);
- fprintf (f, " entry point %#x\n", exec_header->exec_entry);
- fprintf (f, " loader flags %#x\n", exec_header->exec_flags);
- fprintf (f, " bss initializer %#x\n", exec_header->exec_bfill);
+ fprintf (f, " text size %#lx\n", exec_header->exec_tsize);
+ fprintf (f, " text memory offset %#lx\n", exec_header->exec_tmem);
+ fprintf (f, " text file offset %#lx\n", exec_header->exec_tfile);
+ fprintf (f, " data size %#lx\n", exec_header->exec_dsize);
+ fprintf (f, " data memory offset %#lx\n", exec_header->exec_dmem);
+ fprintf (f, " data file offset %#lx\n", exec_header->exec_dfile);
+ fprintf (f, " bss size %#lx\n", exec_header->exec_bsize);
+ fprintf (f, " entry point %#lx\n", exec_header->exec_entry);
+ fprintf (f, " loader flags %#lx\n", exec_header->exec_flags);
+ fprintf (f, " bss initializer %#lx\n", exec_header->exec_bfill);
}
return TRUE;
On which version did you build? som_exec_auxhdr may be different. On
our two HP-UX machines, it is defined as:
struct som_exec_auxhdr {
struct aux_id som_auxhdr; /* som auxiliary header header */
int exec_tsize; /* text size in bytes */
int exec_tmem; /* offset of text in memory */
int exec_tfile; /* location of text in file */
int exec_dsize; /* initialized data */
int exec_dmem; /* offset of data in memory */
int exec_dfile; /* location of data in file */
int exec_bsize; /* uninitialized data (bss) */
int exec_entry; /* offset of entrypoint */
int exec_flags; /* loader flags */
int exec_bfill; /* bss initialization value */
};
Can you check on your side?
Thanks in advance!
Jerome
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: som.c compilation errors
2005-04-20 16:26 som.c compilation errors Jerome Guitton
@ 2005-04-20 18:01 ` Mark Kettenis
2005-04-21 10:52 ` [commit/ob] " Jerome Guitton
0 siblings, 1 reply; 3+ messages in thread
From: Mark Kettenis @ 2005-04-20 18:01 UTC (permalink / raw)
To: Jerome Guitton; +Cc: mark.kettenis, binutils
>
> Hello Mark,
>
> We are experimenting some problems your last modification to som.c. I
> mean,
> this one:
> http://sources.redhat.com/ml/binutils/2005-04/msg00455.html
>
> This modification makes our builds fail on HP-UX 11.00 and 11.11:
>
> @@ -5070,16 +5080,16 @@ som_bfd_print_private_bfd_data (bfd *abf
> fprintf (f, "\n");
> fprintf (f, " type %#x\n", auxhdr->type);
> fprintf (f, " length %#x\n", auxhdr->length);
> - fprintf (f, " text size %#x\n", exec_header->exec_tsize);
> - fprintf (f, " text memory offset %#x\n", exec_header->exec_tmem);
> - fprintf (f, " text file offset %#x\n", exec_header->exec_tfile);
> - fprintf (f, " data size %#x\n", exec_header->exec_dsize);
> - fprintf (f, " data memory offset %#x\n", exec_header->exec_dmem);
> - fprintf (f, " data file offset %#x\n", exec_header->exec_dfile);
> - fprintf (f, " bss size %#x\n", exec_header->exec_bsize);
> - fprintf (f, " entry point %#x\n", exec_header->exec_entry);
> - fprintf (f, " loader flags %#x\n", exec_header->exec_flags);
> - fprintf (f, " bss initializer %#x\n", exec_header->exec_bfill);
> + fprintf (f, " text size %#lx\n",
> exec_header->exec_tsize);
> + fprintf (f, " text memory offset %#lx\n", exec_header->exec_tmem);
> + fprintf (f, " text file offset %#lx\n",
> exec_header->exec_tfile);
> + fprintf (f, " data size %#lx\n",
> exec_header->exec_dsize);
> + fprintf (f, " data memory offset %#lx\n", exec_header->exec_dmem);
> + fprintf (f, " data file offset %#lx\n",
> exec_header->exec_dfile);
> + fprintf (f, " bss size %#lx\n",
> exec_header->exec_bsize);
> + fprintf (f, " entry point %#lx\n",
> exec_header->exec_entry);
> + fprintf (f, " loader flags %#lx\n",
> exec_header->exec_flags);
> + fprintf (f, " bss initializer %#lx\n",
> exec_header->exec_bfill);
> }
>
> return TRUE;
>
>
> On which version did you build? som_exec_auxhdr may be different. On
> our two HP-UX machines, it is defined as:
>
> struct som_exec_auxhdr {
> struct aux_id som_auxhdr; /* som auxiliary header header */
> int exec_tsize; /* text size in bytes */
> int exec_tmem; /* offset of text in memory */
> int exec_tfile; /* location of text in file */
> int exec_dsize; /* initialized data */
> int exec_dmem; /* offset of data in memory */
> int exec_dfile; /* location of data in file */
> int exec_bsize; /* uninitialized data (bss) */
> int exec_entry; /* offset of entrypoint */
> int exec_flags; /* loader flags */
> int exec_bfill; /* bss initialization value */
> };
>
> Can you check on your side?
I compiled on HP-UX 10.20, where these fields are long. The solution is
to add explicit casts. Will do that later if nobody fixed it by then.
Sorry,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
* [commit/ob] som.c compilation errors
2005-04-20 18:01 ` Mark Kettenis
@ 2005-04-21 10:52 ` Jerome Guitton
0 siblings, 0 replies; 3+ messages in thread
From: Jerome Guitton @ 2005-04-21 10:52 UTC (permalink / raw)
To: Mark Kettenis; +Cc: binutils
Mark Kettenis (mark.kettenis@xs4all.nl):
> I compiled on HP-UX 10.20, where these fields are long. The solution is
> to add explicit casts. Will do that later if nobody fixed it by then.
OK, thanks for this information! I have checked in the following, as
obvious:
2005-04-21 Jerome Guitton <guitton@gnat.com>
* som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
for struct som_exec_auxhdr fields.
Index: som.c
===================================================================
RCS file: /cvs/src/src/bfd/som.c,v
retrieving revision 1.53
diff -u -r1.53 som.c
--- som.c 17 Apr 2005 12:45:30 -0000 1.53
+++ som.c 21 Apr 2005 10:45:59 -0000
@@ -5080,16 +5080,20 @@
fprintf (f, "\n");
fprintf (f, " type %#x\n", auxhdr->type);
fprintf (f, " length %#x\n", auxhdr->length);
- fprintf (f, " text size %#lx\n", exec_header->exec_tsize);
- fprintf (f, " text memory offset %#lx\n", exec_header->exec_tmem);
- fprintf (f, " text file offset %#lx\n", exec_header->exec_tfile);
- fprintf (f, " data size %#lx\n", exec_header->exec_dsize);
- fprintf (f, " data memory offset %#lx\n", exec_header->exec_dmem);
- fprintf (f, " data file offset %#lx\n", exec_header->exec_dfile);
- fprintf (f, " bss size %#lx\n", exec_header->exec_bsize);
- fprintf (f, " entry point %#lx\n", exec_header->exec_entry);
- fprintf (f, " loader flags %#lx\n", exec_header->exec_flags);
- fprintf (f, " bss initializer %#lx\n", exec_header->exec_bfill);
+
+ /* Note that, depending on the HP-UX version, the following fields can be
+ either ints, or longs. */
+
+ fprintf (f, " text size %#lx\n", (long) exec_header->exec_tsize);
+ fprintf (f, " text memory offset %#lx\n", (long) exec_header->exec_tmem);
+ fprintf (f, " text file offset %#lx\n", (long) exec_header->exec_tfile);
+ fprintf (f, " data size %#lx\n", (long) exec_header->exec_dsize);
+ fprintf (f, " data memory offset %#lx\n", (long) exec_header->exec_dmem);
+ fprintf (f, " data file offset %#lx\n", (long) exec_header->exec_dfile);
+ fprintf (f, " bss size %#lx\n", (long) exec_header->exec_bsize);
+ fprintf (f, " entry point %#lx\n", (long) exec_header->exec_entry);
+ fprintf (f, " loader flags %#lx\n", (long) exec_header->exec_flags);
+ fprintf (f, " bss initializer %#lx\n", (long) exec_header->exec_bfill);
}
return TRUE;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-21 10:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-20 16:26 som.c compilation errors Jerome Guitton
2005-04-20 18:01 ` Mark Kettenis
2005-04-21 10:52 ` [commit/ob] " Jerome Guitton
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).