When compiling the test program arm-none-linux-gnueabi-gcc -march=armv7-a -O2 -c -o ltest.o ltest.i Assembler fails to assemble it and emits the error Error: offset too big If I do not use -march=armv7-a it works ok and also if I dont use O2 it compiles fine.
Created attachment 18417 [details] preprocessed testcase
Using binutils trunk as well as r150986 I can't reproduce this with -O2 and -march=armv7-a.
(In reply to comment #2) > Using binutils trunk as well as r150986 I can't reproduce this with -O2 and > -march=armv7-a. > I was using 2.18. I haven't tried 2.19 but it works ok with binutils from cvs(updated from today)
My experience: gcc 4.4 + binutils 2.18.50.20070820 + no -march: ok gcc 4.4 + binutils 2.18.50.20070820 + -march=armv7-a: error gcc 4.4 + binutils 2.19.51.0.2.20090204: ok in both cases The instruction I had problems with was: movw r1, #:lower16:_ZL18qt_resource_struct My guess is that gcc started generating these instructions for newer ARM models, but binutils 2.18 couldn't consume them properly. But since it works with a newer binutils, my guess is that the problem is fixed.
Needed an update to a newer version of binutils. Invalid.