Vincent R. wrote:
When compiling the following code with a gcc 4.4 cross-compiler
targetting
arm wince platform I get a problem with undefined reference
__floatdidf
When using nm with gcc-4.4:
$ arm-mingw32ce-nm libgcc.a | grep float
_floatundidf.o:
00000000 T __floatundidf
U __floatunsidf
Somewhere is the source for this module '_floatundidf.o'...
with an old working version (4.1.2):
0000038c T __floatdidf
00000310 T __floatsidf
00000378 T __floatundidf
000002ec T __floatunsidf
00000200 T __floatdisf
000001d0 T __floatsisf
000001f0 T __floatundisf
000001c8 T __floatunsisf
These symbols then being in module '_arm_addsubdf3.o' (which
was not produced)
I found why it's because of the following test :
#ifdef L_arm_addsubdf3
...
#endif
Now I need to find why L_arm_addsubdf3 is defined.
"Not defined" maybe was the aim to write...
So I am still stuck with this missing symbol.
What I don't understand is the fact that __floatundidf is available but not
__floatdidf.
Something else seems to add this although it too should
be in the '_arm_addsubdf3.o' module...
If I look in gcc/config/arm/t-wince-pe here is what is declared for my
target:
LIB1ASMSRC = arm/lib1funcs.asm
LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX
_interwork_call_via_rX _clzsi2 _clzdi2 \
_bb_init_func _lshrdi3 _ashrdi3 _ashldi3 \
_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
_fixsfsi _fixunssfsi _floatdidf _floatdisf \
_arm_fixunsdfsi
and I can see that _floatdidf is declared but is not available in libgcc
These should be object module names, so a '_floatdidf.o' should be
the result from something but the symbol names in it could be totally
different... The 'L_arm_addsubdf3' isn't defined so nothing in that
module will appear...
Does it mean I need to remove _floatdidf _floatdisf from the list ?
No, you could try editing the '_addsubdf3' to '_arm_addsubdf3' and see
what happens...
Maybe the problem comes from the patch I am applying against vanilla gcc :
Index: gcc/config/arm/t-wince-pe
===================================================================
--- gcc/config/arm/t-wince-pe (révision 144104)
+++ gcc/config/arm/t-wince-pe (copie de travail)
@@ -1,6 +1,26 @@
LIB1ASMSRC = arm/lib1funcs.asm
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX
_interwork_call_via_rX _clzsi2 _clzdi2
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX
_interwork_call_via_rX _clzsi2 _clzdi2 \
+ _bb_init_func _lshrdi3 _ashrdi3 _ashldi3 \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+ _fixsfsi _fixunssfsi _floatdidf _floatdisf \
+ _arm_fixunsdfsi
+
+# For most CPUs we have an assembly soft-float implementations.
+# However this is not true for ARMv6M. Here we want to use the soft-fp C
+# implementation. The soft-fp code is only build for ARMv6M. This pulls
+# in the asm implementation for other CPUs.
+#LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func
\
+# _call_via_rX _interwork_call_via_rX \
+# _lshrdi3 _ashrdi3 _ashldi3 \
+# _arm_negdf2 _arm_addsubdf3 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
+# _arm_fixdfsi _arm_fixunsdfsi \
+# _arm_truncdfsf2 _arm_negsf2 _arm_addsubsf3 _arm_muldivsf3 \
+# _arm_cmpsf2 _arm_unordsf2 _arm_fixsfsi _arm_fixunssfsi \
+# _arm_floatdidf _arm_floatdisf _arm_floatundidf _arm_floatundisf \
+# _clzsi2 _clzdi2
+
Yes, this removes producing those '_arm_*' modules in 'ieee754-df.S' !
There is no module sources for '_addsubdf3' available in my gcc-4.4
sources :
[root@Dell arm]# grep addsubdf3 *
bpabi-v6m.S:#ifdef L_arm_addsubdf3
bpabi-v6m.S:#endif /* L_arm_addsubdf3 */
ieee754-df.S:#ifdef L_arm_addsubdf3
ieee754-df.S:#endif /* L_addsubdf3 */
t-arm-elf: _arm_negdf2 _arm_addsubdf3 _arm_muldivdf3 _arm_cmpdf2
_arm_unorddf2 \
t-linux: _arm_addsubdf3 _arm_addsubsf3
t-symbian: _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi
_fixunsdfsi \
only for '_arm_addsubdf3'... So the purpose for the 'patch' is quite
unclear, WHY all those '_arm_*' modules were removed from libgcc ?
Did the old gcc-4.1.2 use these modules? Maybe the naming there was
different? Let's see :
#ifdef L_addsubdf3
ARM_FUNC_START aeabi_drsub
eor xh, xh, #0x80000000 @ flip sign bit of first arg
b 1f
ARM_FUNC_START subdf3
ARM_FUNC_ALIAS aeabi_dsub subdf3
eor yh, yh, #0x80000000 @ flip sign bit of second arg
#if defined(__INTERWORKING_STUBS__)
b 1f @ Skip Thumb-code prologue
#endif
Yes, the naming was changed and gcc-4.4 has added that '_arm' into the
module names...
So my advice is that you would fix the symbol names to have that '_arm'
prefix in LIB1ASMFUNCS ! Where there originally was that, let's have
it still !