This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix host endianess issue in lto streamer (PR lto/47274)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Thu, 3 Feb 2011 08:46:19 +0100
- Subject: Re: [PATCH] Fix host endianess issue in lto streamer (PR lto/47274)
- References: <20110202232200.GO30899@tyan-ft48-01.lab.bos.redhat.com> <4D49F5B3.8070206@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 03, 2011 at 12:24:19AM +0000, Dave Korn wrote:
> On 02/02/2011 23:22, Jakub Jelinek wrote:
>
> > Both kind and visibility are enum vars, i.e. 32-bit on practically all
> > hosts, but lto_output_data_stream (stream, &kind, 1); writes first
> > byte from it (which is the right thing on little endian hosts, but always
> > writes 0 on big endian).
> > I haven't found where this section is actually read (somewhere in lto
> > plugin, somewhere else?)
>
> As you say; see parse_table_entry() in lto-plugin.c
Ah, the confusing thing was that it uses LDP{K,V}_* constants it defines
instead of GCCP{K,V}_* that the streamer uses.
Jakub