This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: som.c compilation errors
- From: "Mark Kettenis" <mark dot kettenis at xs4all dot nl>
- To: "Jerome Guitton" <guitton at adacore dot com>
- Cc: mark dot kettenis at xs4all dot nl, binutils at sources dot redhat dot com
- Date: Wed, 20 Apr 2005 20:01:07 +0200 (CEST)
- Subject: Re: som.c compilation errors
- References: <20050420162552.GA15672@adacore.com>
>
> 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