public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* sizeof and alignement
@ 2000-03-29 23:20 David Martinez Garcia
  2000-03-30  6:45 ` Martin v. Loewis
  2000-04-01  0:00 ` David Martinez Garcia
  0 siblings, 2 replies; 4+ messages in thread
From: David Martinez Garcia @ 2000-03-29 23:20 UTC (permalink / raw)
  To: help-gcc

Dear friends,
We have compiled (using gcc on Linux-Intel platform) with succes some
applications developed in Solaris. Now we want to read the information of
binary files produced in the Sun platform but we have a problem. In
several cases the command 'sizeof' gives different values in both
platforms. Generally only few bytes (4, 8, 12...). We think this is due to
the memory alignment that is forced in the Sun platform. This differences
avoid us to read the right number of bytes when some complex structures
have been writen using the sizeof command in the fwrite instructions.  Is
there any way for solving this problem ? Can we force the gcc compiler to
modify the alignment of the produced code ? Where can we find information
about this common problems when porting applications ?

If you are able of answer any of the previous questions it would be great.
--
David Martinez Garcia
david@fssintl.com
FSS International Europe
Tel. +34 963 826 394
Fax  +34 963 826 392

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-29 23:20 sizeof and alignement David Martinez Garcia
2000-03-30  6:45 ` Martin v. Loewis
2000-04-01  0:00   ` Martin v. Loewis
2000-04-01  0:00 ` David Martinez Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).