This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32381] New: m68k undefined symbol __cmpsf2_internal
- From: "vincent dot riviere at freesbee dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2007 20:00:04 -0000
- Subject: [Bug c/32381] New: m68k undefined symbol __cmpsf2_internal
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This bug has been introduced by Paul Brook on 29/12/2005.
See the diffs here :
http://gcc.gnu.org/viewcvs/branches/gcc-4_2-branch/gcc/config/m68k/lb1sf68.asm?r1=109143&r2=109145&diff_format=h
It occurs when building some executables on m68k targets where
__USER_LABEL_PREFIX__ is not defined or not empty.
When ld tries to link a program with _float.o inside libgcc.a, it fails with :
...lb1sf68.asm:3759: relocation truncated to fit: DISP16 against undefined
symbol `__cmpsf2_internal'
The problem is in the file gcc/config/m68k/lb1sf68.asm, in the definition of
the function SYM (__cmpsf2).
There is function call using bsr (__cmpsf2_internal), but the target function
was defined with SYM (__cmpdf2_internal)
The macro SYM prepends __USER_LABEL_PREFIX__ to its argument.
If __USER_LABEL_PREFIX__ is defined to an empty string (like ELF), the bug is
not visible. But if it is defined to something else (like "_" by default), the
bsr references a symbol named __cmpsf2_internal which will stay undefined
because the actual definition contains 3 leading underscores.
This problem is present in the definition of the function __cmpsf2, but the
similar function __cmpdf2 is ok.
--
Summary: m68k undefined symbol __cmpsf2_internal
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vincent dot riviere at freesbee dot fr
GCC target triplet: m68k-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32381