This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PR gcov-profile/43341] Make layout of gcov structures fixed


Hi,
> Programs with object files with non-default structure packing at the end of
> the TU segfault on 64-bit architectures with -fprofile-generate because the
> layout of runtime-generated gcov structures does not match the layout of the
> same structures in libgcov.

So the problem is that you compile libgcov with default setting but the object
files you link with with something like -fpack-all-structures-you-can-see
(and ABI breaking flag I believe we can have)?
> 
> This patch shuffles the fields of the affected structures so that they can be
> packed without holes and sets 'packed' and 'aligned(sizeof(void*))' attributes
> on them.

This will break bootstrap with non-GCC compiler since gcov-io.h is included to
GCC sources. So at last we need to add some macros to avoid this being used
when buiding GCC.

This will break compatibility to old libgcov builds, but we do that from time
to time, so it seems to make sense, if there are no complains.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]