This is the mail archive of the
mailing list for the GCC project.
Re: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, "Martin v. Loewis" <martin at v dot loewis dot de>, Richard Henderson <rth at twiddle dot net>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 06 Aug 2002 13:33:33 -0700
- Subject: Re: libgcc_s, Linux, and PT_GNU_EH_FRAME, and binutils
--On Tuesday, August 06, 2002 01:17:04 PM -0700 Richard Henderson
On Tue, Aug 06, 2002 at 11:18:49AM -0700, Mark Mitchell wrote:
The real oddity here is that "long long : 64" is aligned more strictly
than "long long" by the C compiler.
By *which* C compiler? Yes, gcc 3.2 aligns a long long bitfield
to 64-bit, but egcs 2.91 certainly does not.
Ah. I didn't realize that this was actually relative recent C ABI
I was using this GCC:
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
as the C compiler.
So what do we do? Personally I'm for fixing the bug.
Blech. I don't like that we broke the C ABI, but I'm not sure I like
breaking it again in the name of fixing it, some two years later.
I guess the fact that nobody noticed until now suggests that maybe
the problem isn't very common, which makes either decision less
If we *do* want to fix it, we need to look everywhere. For example,
place_union_field gives the union the alignment of the type of the bit
field in the PCC_BITFIELD_TYPE_MATTERS case. So, I think a union with
a long long bit field will get 8-byte aligned, which is weird.
And place_field gates the alignment by maximum_field_alignment -- but
not by desired_field_alignment. Again, in the PCC_BITFIELD_TYPE_MATTERS
case, which is the usual case on x86.
Mark Mitchell email@example.com
CodeSourcery, LLC http://www.codesourcery.com