delorie.com/archives/browse.cgi | search |
From: | "Jack K." <xos AT o2 DOT pl> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: data alignment |
Date: | Thu, 3 May 2001 12:51:51 +0200 |
Organization: | tp.internet - http://www.tpi.pl |
Lines: | 33 |
Message-ID: | <9crm5s$id0$1@news.tpi.pl> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 1010503110508 DOT 26629L-100000 AT is> |
NNTP-Posting-Host: | pe175.gdansk.cvx.ppp.tpnet.pl |
X-Trace: | news.tpi.pl 988896252 18848 213.76.28.175 (3 May 2001 13:24:12 GMT) |
X-Complaints-To: | usenet AT tpi DOT pl |
NNTP-Posting-Date: | 3 May 2001 13:24:12 GMT |
X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
X-MSMail-Priority: | Normal |
X-Priority: | 3 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Uzytkownik "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il> napisal w wiadomosci news:Pine DOT SUN DOT 3 DOT 91 DOT 1010503110508 DOT 26629L-100000 AT is... > > On Thu, 3 May 2001, Jack K. wrote: > > > The linker (or compiler) ignores if > > I define a variable with "__attribute__ ((aligned(16)))". What is the > > reason? > > What alignment in bytes did you want for that variable, and how did you > see that the above attribute is ignored? Try // file.c int aa; int bb __attribute__ ((aligned(16))); int main() { } Compile it: gcc -c file.c ld -Map zz.map file.o Look over the file zz.map. The "bb" is at address 0x01a04. (aligned 4 not 16)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |