linux-mips
[Top] [All Lists]

Re: MIPS gas problem

To: Hiroyuki Machida <machida@sm.sony.co.jp>
Subject: Re: MIPS gas problem
From: Florian Lohoff <flo@rfc822.org>
Date: Thu, 20 Apr 2000 12:16:10 +0200
Cc: linux@cthulhu.engr.sgi.com
In-reply-to: <20000420111320Z.machida@sm.sony.co.jp>; from Hiroyuki Machida on Thu, Apr 20, 2000 at 11:13:20AM +0900
Organization: rfc822 - pure communication
References: <20000420111320Z.machida@sm.sony.co.jp>
Sender: owner-linuxmips@oss.sgi.com
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."


<Prev in Thread] Current Thread [Next in Thread>