Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Florian Lohoff <flo@rfc822.org>
To: Hiroyuki Machida <machida@sm.sony.co.jp>
Cc: linux@cthulhu.engr.sgi.com
Subject: Re: MIPS gas problem
Date: Thu, 20 Apr 2000 12:16:10 +0200	[thread overview]
Message-ID: <20000420121610.B1247@paradigm.rfc822.org> (raw)
In-Reply-To: <20000420111320Z.machida@sm.sony.co.jp>; from Hiroyuki Machida on Thu, Apr 20, 2000 at 11:13:20AM +0900

On Thu, Apr 20, 2000 at 11:13:20AM +0900, Hiroyuki Machida wrote:
> 
> I found the problem  "__attribute__ ((aligned(xx))" doesn't work
> properly on MIPS/Linux. Please try to execute the attached test. 
> I think this problem can be reproduced on any ELF/MIPS box except
> EMBEDED system which has OS name "elf". 
> 
> I tracked down and finaly found gas/config/t-mips.c:s_change_sec(sec) 
> sets  always ".rodata" section-alignment to 2**4. This should be set 
> to the maximum rodata object's alignment value.

Hmm,
if i understand that correctly i am seeing a different behaviour:
(egcs 1.0.3a + binutils 2.8.1)

[flo@repeat flo]$ gcc -save-temps -o rotest rotest.c
rotest.c:8: warning: alignment of `global1' is greater than maximum object file alignment
rotest.c:9: warning: alignment of `global2' is greater than maximum object file alignment
rotest.c:11: warning: alignment of `local1' is greater than maximum object file alignment
rotest.c:12: warning: alignment of `local2' is greater than maximum object file alignment

And i see only a max alignment 3 in the rotest.s, and as expected
the test fails:

[flo@repeat flo]$ ./rotest 
* readonly local/gloabl
chcking align:400
err:4007a8 expected:400400
err:400798 expected:400400
4007a8:400798
chcking align:1000
err:400798 expected:400000
err:4007a0 expected:400000
400798:4007a0

NG:4

Flo
-- 
Florian Lohoff		flo@rfc822.org		      	+49-subject-2-change
"Technology is a constant battle between manufacturers producing bigger and
more idiot-proof systems and nature producing bigger and better idiots."

  reply	other threads:[~2000-04-20 10:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-20  2:13 MIPS gas problem Hiroyuki Machida
2000-04-20 10:16 ` Florian Lohoff [this message]
2000-04-20 12:07 ` Koundinya.K
     [not found]   ` <20000420164812.17210.qmail@daffy.airs.com>
2000-04-21  1:52     ` Hiroyuki Machida
2000-04-24  5:06       ` Koundinya.K
2000-04-21  3:30     ` Hiroyuki Machida
     [not found]       ` <20000421154859.3820.qmail@daffy.airs.com>
2000-04-24  3:16         ` Hiroyuki Machida
2000-04-24  3:16           ` Hiroyuki Machida

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=20000420121610.B1247@paradigm.rfc822.org \
    --to=flo@rfc822.org \
    --cc=linux@cthulhu.engr.sgi.com \
    --cc=machida@sm.sony.co.jp \
    /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