Message ID | ydd7hazoc8q.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Tue, 12 Apr 2011 15:00:53 +0200 > On Solaris 10, as assembles the test just fine, but ld cannot deal with > gas 2.21 output: > > ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file gotdata.o: symbol <unknown>: offset 0xff370163 is non-aligned > ld: fatal: relocation error: R_SPARC_GOTDATA_LOX10: file gotdata.o: symbol <unknown>: offset 0xff370167 is non-aligned > ld: fatal: file gotdata: creation interrupted: Error 0 Really strange error message, could you see if adding something as simply as ".align 4" after the ".text" in the test assembler makes this go away? > > On Solaris 11, all is fine. > > I get the same results with an unmodifed tree and the following > simplified version of my patch. > > Ok for mainline? I'm fine with this patch, we can try to attack the above problem independently.
David Miller <davem@davemloft.net> writes: > From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > Date: Tue, 12 Apr 2011 15:00:53 +0200 > >> On Solaris 10, as assembles the test just fine, but ld cannot deal with >> gas 2.21 output: >> >> ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file gotdata.o: symbol <unknown>: offset 0xff370163 is non-aligned >> ld: fatal: relocation error: R_SPARC_GOTDATA_LOX10: file gotdata.o: symbol <unknown>: offset 0xff370167 is non-aligned >> ld: fatal: file gotdata: creation interrupted: Error 0 > > Really strange error message, could you see if adding something as simply as > ".align 4" after the ".text" in the test assembler makes this go away? yep, that does the trick. >> Ok for mainline? > > I'm fine with this patch, we can try to attack the above problem independently. Thanks, installed. Rainer
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Date: Wed, 13 Apr 2011 19:16:32 +0200 > David Miller <davem@davemloft.net> writes: > >> From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> >> Date: Tue, 12 Apr 2011 15:00:53 +0200 >> >>> On Solaris 10, as assembles the test just fine, but ld cannot deal with >>> gas 2.21 output: >>> >>> ld: fatal: relocation error: R_SPARC_GOTDATA_HIX22: file gotdata.o: symbol <unknown>: offset 0xff370163 is non-aligned >>> ld: fatal: relocation error: R_SPARC_GOTDATA_LOX10: file gotdata.o: symbol <unknown>: offset 0xff370167 is non-aligned >>> ld: fatal: file gotdata: creation interrupted: Error 0 >> >> Really strange error message, could you see if adding something as simply as >> ".align 4" after the ".text" in the test assembler makes this go away? > > yep, that does the trick. > >>> Ok for mainline? >> >> I'm fine with this patch, we can try to attack the above problem independently. > > Thanks, installed. Thanks Rainer, if you cons up a patch to add the ".align" directive I'll ACK that as well.
David Miller <davem@davemloft.net> writes: > Thanks Rainer, if you cons up a patch to add the ".align" directive I'll ACK > that as well. That's my plan: I'll include such a patch in my S8 to S11 bootstraps over the weekend to make sure nothing breaks. Rainer
diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3305,17 +3305,13 @@ bar: ld [[%l7 + %g1]], %g2, %gdop(foo)], [if test x$gcc_cv_ld != x \ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then - if $gcc_cv_ld -v | grep GNU >/dev/null 2>&1; then - if test x$gcc_cv_objdump != x; then - if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \ - | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then + if test x$gcc_cv_objdump != x; then + if $gcc_cv_objdump -s -j .text conftest 2> /dev/null \ + | grep ' 03000004 82186004 c405c001'> /dev/null 2>&1; then gcc_cv_as_sparc_gotdata_op=no - else + else gcc_cv_as_sparc_gotdata_op=yes - fi fi - else - gcc_cv_as_sparc_gotdata_op=yes fi fi rm -f conftest],