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.
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
rotest.c:9: warning: alignment of `global2' is greater than maximum object file
rotest.c:11: warning: alignment of `local1' is greater than maximum object file
rotest.c:12: warning: alignment of `local2' is greater than maximum object file
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
Florian Lohoff email@example.com +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."