I've been playing around with writing some assembly language code for the GP2X and I've run into a peculiar problem. I'm using the arm-linux-as assembler to assemble my source into .o files but when I try to link them with .o files created by compiling C source with arm-linux-gcc, I get the following error:
ERROR: fxdmath.o uses hardware FP, whereas test uses software FP
After googling around I figured out that this is a "feature" of GCC to prevent the linking of objects compiled with conflicting floating point settings (soft-float/hard-float).
My assembly code doesn't use any of the floating point instructions:
Does anybody know how to get the GNU assembler to add the magic bits into the object files it creates so that the GNU linker doesn't complain?
ERROR: fxdmath.o uses hardware FP, whereas test uses software FP
After googling around I figured out that this is a "feature" of GCC to prevent the linking of objects compiled with conflicting floating point settings (soft-float/hard-float).
My assembly code doesn't use any of the floating point instructions:
Code:
.align 2 /* word alignment */
.global fxdAdd /* make fxAdd a global symbol */
.type fxdAdd, %function /* declare fxdAdd as a function */
fxdAdd:
add r0, r0, r1 /* r0 = r0 + r1 */
bx lr /* return */
.size fxdAdd, .-fxdAdd /* calculate size of fxdAdd */
Does anybody know how to get the GNU assembler to add the magic bits into the object files it creates so that the GNU linker doesn't complain?