public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Michael Anburaj" <embeddedeng@hotmail.com>
To: ecos-discuss@ecos.sourceware.org
Subject: [ECOS] Byte array address alignement
Date: Wed, 26 Oct 2005 04:01:00 -0000	[thread overview]
Message-ID: <BAY107-F283C3EC93FCF5E09789CC0AD690@phx.gbl> (raw)
In-Reply-To: <1130279823.5754.32.camel@hermes>

Hi,

I have very general compiler question. Since, there are a lot of experts 
here, I am sure I will get an answer :)

I see that most compiler follow this alignment rule for byte arrays (I guess 
structures too), that they get aligned at least on a 4byte boundary on a 
32bit machine (like ARM or MIPS32 & so on).

I donÂ’t know if this alignment is an artifact of something else or the 
tool-chain has a rule as such for doing so.

Can anyone who is familiar with this, throw some light on this subject?
1.	I am curious to know if such a rule exists in C compilers?
2.	If so, what is it called? It will be great if you could point me to some 
matrial.

Thanks a lot,
-Mike.

Sample code:

Char C1;
Char C2[8];
Char C3;

&C1 is equal to 0x800001
&C2 is equal to 0x800004
&C3 is equal to 0x800002



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2005-10-26  4:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 21:41 [ECOS] Redboot rebuild problem Wang, Liu (Liu)
2005-10-25 22:37 ` Gary Thomas
2005-10-26  4:01   ` Michael Anburaj [this message]
2005-10-26  5:03     ` [ECOS] Byte array address alignement Paul D. DeRocco

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAY107-F283C3EC93FCF5E09789CC0AD690@phx.gbl \
    --to=embeddedeng@hotmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).