See my posting at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584, Bug 54584 
- m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES.

The problem is a program always includes a size 0 section, .tm_clone_table, 
from crtbegin.o/crtend.o (libgcc/crtstuff.c), even though the program does not 
use the -gnu-tm option.  I'm guessing the .tm_clone_table __attribute__ 
((used)) results in the ALLOC flag for the section, which causes the linker 
(ld? elf2flt?) to croak when there is nothing to allocate.  Linking without 
-elf2flt does not fail, and results in an image without a .tm_clone_table 
section.  I don't know why the linker for -msep-data/-fPIC code can't figure 
out how to do the same thing.

My workaround is to disable USE_TM_CLONE_REGISTRY in gcc/config/m68k/uclinux.h 
(this patch is good for both GCC 4.7 and GCC 4.8):

--- gcc-4.7-20120908/gcc/config/m68k/uclinux.h
+++ gcc-4.7-20120908-patched/gcc/config/m68k/uclinux.h
@@ -22,2 +22,4 @@

+/* Do not use TM clone registry.  It breaks -msep-data (-fPIC) code. */
+#define USE_TM_CLONE_REGISTRY 0
#undef STARTFILE_SPEC

Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov



_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to