Peter Memishian <[EMAIL PROTECTED]> wrote:
>
> > I know of only one case where obscure packing is needed and in this
> > case even #pragma pack(1) does not work:
> >
> > It seems that gcc needs "__attribute__((packed))" past some structure
> > definitions in order to avoid post structure padding for ARM
> > processors.
>
> I'm not sure I follow; are you saying that gcc generally supports use of
> either #pragma pack or __attribute__((packed)), but in the specific case
> above, only the latter works? Strange.
Correct. But it seems to be a gcc bug. The C-standard allows padding at the end
of a structure but from my understanding, a structure like
struct xxx {
...
type last element;
char pad[0];
};
should return the unpadded structure size when using offsetoff(struct xxx, pad).
This does not work with gcc.
The problem has been reported against mkisofs on ARM. I will need to introduce
struct xxx {
...
type last element;
} __attribute__((packed);
in order to create readable ISO images on ARM/gcc systems.
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code