public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
@ 2012-09-14 20:44 baker at usgs dot gov
  2012-09-15  0:39 ` [Bug target/54584] " baker at usgs dot gov
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-14 20:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

             Bug #: 54584
           Summary: m68k-uclinux error: Link tests are not allowed after
                    GCC_NO_EXECUTABLES
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: baker@usgs.gov


Created attachment 28193
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28193
Make m68k-uclinux-gcc/g++ cross compilers

Host: i686-pc-linux (also x86_64-apple-darwin10.8.0)
Target: m68k-uclinux (Coldfire)

Build of msep-data/libstdc++-v3 fails for FreeScale Coldfire uClinux target
(complete configure and build commands are attached):

:
Running configure in multilib subdir msep-data
:
checking command to parse
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/nm output from
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/xgcc
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/bin/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/lib/ -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/include -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/sys-include  -msep-data -Wa,-mno-mac
object... failed
:
checking for shl_load... configure: error: Link tests are not allowed after
GCC_NO_EXECUTABLES.
make[2]: *** [configure-target-libstdc++-v3] Error 1

In msep-data/libstdc++-v3/config.log there is an earlier link failure which
causes gcc_no_link=yes:

configure:3885: /tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/xgcc
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/../freescale-coldfire-gcc-4.7-20120908/m68k-uclinux/bin/
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/../freescale-coldfire-gcc-4.7-20120908/m68k-uclinux/lib/
-isystem
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/../freescale-coldfire-gcc-4.7-20120908/m68k-uclinux/include
-isystem
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/../freescale-coldfire-gcc-4.7-20120908/m68k-uclinux/sys-include
 -msep-data -Wa,-mno-mac -o conftest -g -O2   conftest.c  >&5
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/bin/ld.real:
final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

configure:11284: checking for shl_load
configure:11284: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

I extracted the failed command and showed that the link fails for both
msep-data and -fPIC (implied by -msep-data):

$ cat conftest.c
/* confdefs.h */
#define PACKAGE_NAME "package-unused"
#define PACKAGE_TARNAME "libstdc++"
#define PACKAGE_VERSION "version-unused"
#define PACKAGE_STRING "package-unused version-unused"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}

# Failed link from libstdc++-v3/configure:
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/xgcc -t
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/bin/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/lib/ -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/include -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/sys-include -msep-data -Wa,-mno-mac -o
conftest conftest.o
# /usr/local/gcc-4.7-20120908/m68k-uclinux/bin/ld.real: final link failed:
Nonrepresentable section on output
# collect2: error: ld returned 1 exit status

# The problem is actually with -fPIC (implied by -msep-data):
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/xgcc -t
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/bin/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/lib/ -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/include -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/sys-include -fPIC -Wa,-mno-mac -o
conftest conftest.o
# /usr/local/gcc-4.7-20120908/m68k-uclinux/bin/ld.real: final link failed:
Nonrepresentable section on output
# collect2: error: ld returned 1 exit status

The link does not fail when the GCC 4.6 crtbegin.o/crtend.o binaries are used:

# Linking with the 4.6 crtbegin/crtend binaries makes the problem go away:
\mv cross-gcc-4.7-20120908/gcc/msep-data/crtbegin{,-4.7}.o
\mv cross-gcc-4.7-20120908/gcc/msep-data/crtend{,-4.7}.o
\cp cross-gcc-{4.6-20120907,4.7-20120908}/gcc/msep-data/crtbegin.o
\cp cross-gcc-{4.6-20120907,4.7-20120908}/gcc/msep-data/crtend.o

/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/xgcc -t
-B/tmp/freescale-coldfile-xgcc/cross-gcc-4.7-20120908/./gcc/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/bin/
-B/usr/local/gcc-4.7-20120908/m68k-uclinux/lib/ -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/include -isystem
/usr/local/gcc-4.7-20120908/m68k-uclinux/sys-include -msep-data -Wa,-mno-mac -o
conftest conftest.o

\mv cross-gcc-4.7-20120908/gcc/msep-data/crtbegin{-4.7,}.o
\mv cross-gcc-4.7-20120908/gcc/msep-data/crtend{-4.7,}.o

Two new features in GCC 4.7 libgcc/crtstuff.c (was gcc/crtstuff.c in GCC 4.6)
controlled by USE_INITFINI_ARRAY and USE_™_CLONE_REGISTRY:

USE_INITFINI_ARRAY is defined in gcc/config/initfini-array.h if
HAVE_INITFINI_ARRAY_SUPPORT is defined:

#ifdef HAVE_INITFINI_ARRAY_SUPPORT

#define USE_INITFINI_ARRAY

It is not defined in cross-gcc-4.7-20120908/gcc/auto-host.h:

/* #undef HAVE_INITFINI_ARRAY_SUPPORT */

I assume the definition is controlled by the new --enable-initfini-array GCC
configure option.

USE_TM_CLONE_REGISTRY is defined in libgcc/crtstuff.c if it is not already
defined and OBJECT_FORMAT_ELF is defined:

#if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF)
# define USE_TM_CLONE_REGISTRY 1
#endif

This permits USE_TM_CLONE_REGISTRY to be defined as 0 elsewhere to disable the
feature, as is done for OpenVMS/Alpha in gcc/config/alpha/vms.h.

Don't know if -fgnu-tm depends on USE_TM_CLONE_REGISTRY.  (How can it?  It is
only set to 1 in crtstuff.c.)  I'm guessing that code emitted for -fgnu-tm will
fail to link when USE_TM_CLONE_REGISTRY is 0.

Perhaps all that is required is to fix the attributes of section
.tm_clone_table.

In the mean time, apply the same fix used for OpenMVS/Alpha to
gcc/config/m68k/uclinux.h (this patch is good for both GCC 4.7 and GCC 4.8):

--- gcc-4.7/gcc/config/m68k/uclinux.h
+++ gcc-4.7-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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
@ 2012-09-15  0:39 ` baker at usgs dot gov
  2012-09-18  2:45 ` baker at usgs dot gov
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-15  0:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #1 from Larry Baker <baker at usgs dot gov> 2012-09-15 00:39:14 UTC ---
I found that the -msep-data link would succeed if program section
.tm_clone_table has a non-zero length.

I changed __JCR_LIST__[] and __TMC_LIST__[] to __JCR_LIST__[1] and
__TMC_LIST__[1], respectively, in
gcc-4.7-20120908/libgcc/crtstuff.c.

The program sections in the original crtbegin.o have 0 length for program
section .tm_clone_table:

# freescale-coldfire-2011.09/bin/m68k-uclinux-objdump -h
cross-gcc-4.7-20120908/gcc/msep-data/crtbegin.o

cross-gcc-4.7-20120908/gcc/msep-data/crtbegin.o:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000136  00000000  00000000  00000034  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000004  00000000  00000000  0000016c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000001e  00000000  00000000  00000170  2**2
                  ALLOC
  3 .ctors        00000004  00000000  00000000  00000170  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .dtors        00000004  00000000  00000000  00000174  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .eh_frame     00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .jcr          00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .tm_clone_table 00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .fini         00000006  00000000  00000000  00000178  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  9 .init         00000006  00000000  00000000  0000017e  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
 10 .comment      00000028  00000000  00000000  00000184  2**0
                  CONTENTS, READONLY
 11 .note.GNU-stack 00000000  00000000  00000000  000001ac  2**0
                  CONTENTS, READONLY

The new one has length 4:

# freescale-coldfire-2011.09/bin/m68k-uclinux-objdump -h
cross-gcc-4.7-20120908/gcc/msep-data/crtbegin.o

cross-gcc-4.7-20120908/gcc/msep-data/crtbegin.o:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000136  00000000  00000000  00000034  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000004  00000000  00000000  0000016c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000001e  00000000  00000000  00000170  2**2
                  ALLOC
  3 .ctors        00000004  00000000  00000000  00000170  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .dtors        00000004  00000000  00000000  00000174  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .eh_frame     00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .jcr          00000004  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .tm_clone_table 00000004  00000000  00000000  0000017c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .fini         00000006  00000000  00000000  00000180  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  9 .init         00000006  00000000  00000000  00000186  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
 10 .comment      00000028  00000000  00000000  0000018c  2**0
                  CONTENTS, READONLY
 11 .note.GNU-stack 00000000  00000000  00000000  000001b4  2**0
                  CONTENTS, READONLY

I do not know if this results in a correctly allocated or populated
.tm_clone_table.  All I know is that the zero length allocation caused the link
failure.  Is this due to the ALLOC attribute with 0 length?  Is this a
consequence of __attribute__((used))?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
  2012-09-15  0:39 ` [Bug target/54584] " baker at usgs dot gov
@ 2012-09-18  2:45 ` baker at usgs dot gov
  2012-09-18 21:43 ` baker at usgs dot gov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-18  2:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #2 from Larry Baker <baker at usgs dot gov> 2012-09-18 02:44:43 UTC ---
The Sourcery (Mentor Graphics) ColdFire uClinux SDK I use uses binutils-1.21. 
I installed binutils-2.22 and the latest uClinux elf2flt (downloaded 20120730).

$ /usr/local/gcc-4.7.1/bin/m68k-uclinux-ld -V -v
GNU ld (GNU Binutils) 2.22
  Supported emulations:
   m68kelf
GNU ld (GNU Binutils) 2.22

The error message is the same (Nonrepresentable section on output).

I am able to issue the failing command (collect2) outside of make gcc:

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
\
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -elf2flt -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)_exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__errno_location.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)errno.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: final link failed:
Nonrepresentable section on output
collect2: error: ld returned 1 exit status

If I remove the -elf2flt option, the error goes away:

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
\
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)_exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__errno_location.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)errno.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o

We can see that the size 0 .tm_clone_table section from crtbegin.o/crtend.o
does not appear in the elf32-m68k executable (conftest):

$ /usr/local/gcc-4.7.1/bin/m68k-uclinux-objdump -h
cross-gcc-4.7.1/gcc/msep-data/crtbegin.o

cross-gcc-4.7.1/gcc/msep-data/crtbegin.o:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         00000136  00000000  00000000  00000034  2**2
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  1 .data         00000004  00000000  00000000  0000016c  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  2 .bss          0000001e  00000000  00000000  00000170  2**2
                  ALLOC
  3 .ctors        00000004  00000000  00000000  00000170  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  4 .dtors        00000004  00000000  00000000  00000174  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  5 .eh_frame     00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  6 .jcr          00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .tm_clone_table 00000000  00000000  00000000  00000178  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .fini         00000006  00000000  00000000  00000178  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
  9 .init         00000006  00000000  00000000  0000017e  2**0
                  CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
 10 .comment      00000012  00000000  00000000  00000184  2**0
                  CONTENTS, READONLY
 11 .note.GNU-stack 00000000  00000000  00000000  00000196  2**0
                  CONTENTS, READONLY

$ /usr/local/gcc-4.7.1/bin/m68k-uclinux-objdump -h conftest

conftest:     file format elf32-m68k

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .init         00000014  80000094  80000094  00000094  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  1 .text         000004f8  800000a8  800000a8  000000a8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .fini         0000000e  800005a0  800005a0  000005a0  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  3 .rodata       00000001  800005ae  800005ae  000005ae  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .eh_frame     00000004  800005b0  800005b0  000005b0  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .ctors        00000008  800025b4  800025b4  000005b4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  6 .dtors        00000008  800025bc  800025bc  000005bc  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .jcr          00000004  800025c4  800025c4  000005c4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  8 .got          000000e0  800025c8  800025c8  000005c8  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .data         0000002c  800026a8  800026a8  000006a8  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 10 .bss          00000044  800026d4  800026d4  000006d4  2**2
                  ALLOC
 11 .comment      00000011  00000000  00000000  000006d4  2**0
                  CONTENTS, READONLY

The Nonrepresentable... error message comes from the binutils bfd library:

$ find . -type f -exec grep Nonrepresentable {} ';' -ls
  N_("Nonrepresentable section on output"),
2461573630      104 -rw-r--r--    1 baker    wheel       49841 Jul 11  2011
./binutils-2.22/bfd/bfd.c

I don't know where in bfd the error occurs -- there are many bfd_set_error
(bfd_error_nonrepresentable_section) calls.

I assume that "normal" ld uses bfd.  So, what is it about Flat Binary
-msep-data (-fPIC) code that is causing the problem?

I will raise the issue on the uClinux user forum as well.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
  2012-09-15  0:39 ` [Bug target/54584] " baker at usgs dot gov
  2012-09-18  2:45 ` baker at usgs dot gov
@ 2012-09-18 21:43 ` baker at usgs dot gov
  2012-09-18 21:53 ` baker at usgs dot gov
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-18 21:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #3 from Larry Baker <baker at usgs dot gov> 2012-09-18 21:43:32 UTC ---
I don't know how to attach gdb to the ld.real called by collect2.  So, I added
a bunch of debugging output to bfd/elflink.c to find out where the failure
occurs.  (I'll attach my hacked version.)

Here's the link without -elf2flt and with -elf2flt.  The object files/libraries
are the same, yet the program sections that ld.real sees are quite different.

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)_exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__errno_location.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)errno.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
---> ldwrite: pid = 81433
---> ldwrite: lang_for_each_statement()
---> ldwrite: bfd_final_link()
---> bfd_elf_final_link:
---> bfd_elf_final_link: remove input section .init
---> bfd_elf_final_link: remove input section .text
---> bfd_elf_final_link: remove input section .fini
---> bfd_elf_final_link: remove input section .rodata
---> bfd_elf_final_link: remove input section .eh_frame
---> bfd_elf_final_link: remove input section .ctors
---> bfd_elf_final_link: remove input section .dtors
---> bfd_elf_final_link: remove input section .jcr
---> bfd_elf_final_link: remove input section .got
---> bfd_elf_final_link: remove input section .data
---> bfd_elf_final_link: remove input section .bss
---> bfd_elf_final_link: remove input section .comment
---> bfd_elf_final_link: count relocations for section .init
---> bfd_elf_final_link: count relocations for section .text
---> bfd_elf_final_link: count relocations for section .fini
---> bfd_elf_final_link: count relocations for section .rodata
---> bfd_elf_final_link: count relocations for section .eh_frame
---> bfd_elf_final_link: count relocations for section .ctors
---> bfd_elf_final_link: count relocations for section .dtors
---> bfd_elf_final_link: count relocations for section .jcr
---> bfd_elf_final_link: count relocations for section .got
---> bfd_elf_final_link: count relocations for section .data
---> bfd_elf_final_link: count relocations for section .bss
---> bfd_elf_final_link: count relocations for section .comment
---> bfd_elf_final_link: set size, file position for section .init
---> bfd_elf_final_link: set size, file position for section .text
---> bfd_elf_final_link: set size, file position for section .fini
---> bfd_elf_final_link: set size, file position for section .rodata
---> bfd_elf_final_link: set size, file position for section .eh_frame
---> bfd_elf_final_link: set size, file position for section .ctors
---> bfd_elf_final_link: set size, file position for section .dtors
---> bfd_elf_final_link: set size, file position for section .jcr
---> bfd_elf_final_link: set size, file position for section .got
---> bfd_elf_final_link: set size, file position for section .data
---> bfd_elf_final_link: set size, file position for section .bss
---> bfd_elf_final_link: set size, file position for section .comment
---> bfd_elf_final_link: output symbol for section .init
---> bfd_elf_final_link: output symbol for section .text
---> bfd_elf_final_link: output symbol for section .fini
---> bfd_elf_final_link: output symbol for section .rodata
---> bfd_elf_final_link: output symbol for section .eh_frame
---> bfd_elf_final_link: output symbol for section .ctors
---> bfd_elf_final_link: output symbol for section .dtors
---> bfd_elf_final_link: output symbol for section .jcr
---> bfd_elf_final_link: output symbol for section .got
---> bfd_elf_final_link: output symbol for section .data
---> bfd_elf_final_link: output symbol for section .bss
---> bfd_elf_final_link: output symbol for section .comment
---> bfd_elf_final_link: reorder section .init
---> bfd_elf_final_link: reorder section .text
---> bfd_elf_final_link: reorder section .fini
---> bfd_elf_final_link: reorder section .rodata
---> bfd_elf_final_link: reorder section .eh_frame
---> bfd_elf_final_link: reorder section .ctors
---> bfd_elf_final_link: reorder section .dtors
---> bfd_elf_final_link: reorder section .jcr
---> bfd_elf_final_link: reorder section .got
---> bfd_set_error: bfd_error_nonrepresentable_section
---> bfd_set_error: bfd_error_nonrepresentable_section
---> bfd_elf_final_link: reorder section .data
---> bfd_elf_final_link: reorder section .bss
---> bfd_elf_final_link: reorder section .comment
---> bfd_elf_final_link: output local symbols for section .init
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: output local symbols for section .text
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: output local symbols for section .fini
---> bfd_elf_final_link: output local symbols for section .rodata
---> bfd_elf_final_link: output local symbols for section .eh_frame
---> bfd_elf_final_link: output local symbols for section .ctors
---> bfd_elf_final_link: output local symbols for section .dtors
---> bfd_elf_final_link: output local symbols for section .jcr
---> bfd_elf_final_link: output local symbols for section .got
---> bfd_elf_final_link: output local symbols for section .data
---> bfd_elf_final_link: output local symbols for section .bss
---> bfd_elf_final_link: output local symbols for section .comment
---> bfd_elf_final_link: adjust relocs for section .init
---> bfd_elf_final_link: adjust relocs for section .text
---> bfd_elf_final_link: adjust relocs for section .fini
---> bfd_elf_final_link: adjust relocs for section .rodata
---> bfd_elf_final_link: adjust relocs for section .eh_frame
---> bfd_elf_final_link: adjust relocs for section .ctors
---> bfd_elf_final_link: adjust relocs for section .dtors
---> bfd_elf_final_link: adjust relocs for section .jcr
---> bfd_elf_final_link: adjust relocs for section .got
---> bfd_elf_final_link: adjust relocs for section .data
---> bfd_elf_final_link: adjust relocs for section .bss
---> bfd_elf_final_link: adjust relocs for section .comment
---> bfd_elf_final_link: output dynamic section .text
---> bfd_elf_final_link: output dynamic section .data
---> bfd_elf_final_link: output dynamic section .bss
---> bfd_elf_final_link: output dynamic section .ctors
---> bfd_elf_final_link: output dynamic section .dtors
---> bfd_elf_final_link: output dynamic section .eh_frame
---> bfd_elf_final_link: output dynamic section .jcr
---> bfd_elf_final_link: output dynamic section .tm_clone_table
---> bfd_elf_final_link: output dynamic section .fini
---> bfd_elf_final_link: output dynamic section .init
---> bfd_elf_final_link: output dynamic section .comment
---> bfd_elf_final_link: output dynamic section .note.GNU-stack
---> bfd_elf_final_link: output dynamic section .rela.got
---> bfd_elf_final_link: output dynamic section .got
---> bfd_elf_final_link: output dynamic section .got.plt
---> bfd_elf_final_link: normal return
---> bfd_elf_final_link: return TRUE

$
COMPILER_PATH=/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/:/usr/local/gcc-4.7.1/m68k-uclinux/bin/:/usr/local/gcc-4.7.1/m68k-uclinux/lib/
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/collect2
--sysroot=/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data
--eh-frame-hdr -elf2flt -o conftest -t
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data
-L/usr/local/gcc-4.7.1/m68k-uclinux/lib/msep-data
-L/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc
-L/usr/local/gcc-4.7.1/m68k-uclinux/bin -L/usr/local/gcc-4.7.1/m68k-uclinux/lib
-L/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib
conftest.o -lgcc -lc -lgcc
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: mode m68kelf
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crt1.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crti.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtbegin.o
conftest.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__uClibc_main.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strrchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)_exit.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)__errno_location.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)strchr.o
(/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/libc.a)errno.o
/tmp/freescale-coldfile-xgcc/cross-gcc-4.7.1/gcc/msep-data/crtend.o
/tmp/freescale-coldfile-xgcc/freescale-coldfire-2011.09/m68k-uclinux/libc/msep-data/usr/lib/crtn.o
---> ldwrite: pid = 81437
---> ldwrite: lang_for_each_statement()
---> ldwrite: bfd_final_link()
---> bfd_elf_final_link:
---> bfd_elf_final_link: remove input section .text
---> bfd_elf_final_link: remove input section .data
---> bfd_elf_final_link: remove input section .eh_frame
---> bfd_elf_final_link: remove input section .bss
---> bfd_elf_final_link: remove input section .comment
---> bfd_elf_final_link: count relocations for section .text
---> bfd_elf_final_link: count relocations for section .data
---> bfd_elf_final_link: count relocations for section .eh_frame
---> bfd_elf_final_link: count relocations for section .bss
---> bfd_elf_final_link: count relocations for section .comment
---> bfd_elf_final_link: set size, file position for section .text
---> bfd_elf_final_link: set size, file position for section .data
---> bfd_elf_final_link: set size, file position for section .eh_frame
---> bfd_elf_final_link: set size, file position for section .bss
---> bfd_elf_final_link: set size, file position for section .comment
---> bfd_elf_final_link: output symbol for section .text
---> bfd_elf_final_link: output symbol for section .data
---> bfd_elf_final_link: output symbol for section .eh_frame
---> bfd_elf_final_link: output symbol for section .bss
---> bfd_elf_final_link: output symbol for section .comment
---> bfd_elf_final_link: reorder section .text
---> bfd_elf_final_link: reorder section .data
---> bfd_set_error: bfd_error_nonrepresentable_section
---> bfd_set_error: bfd_error_nonrepresentable_section
---> bfd_elf_final_link: reorder section .eh_frame
---> bfd_elf_final_link: reorder section .bss
---> bfd_elf_final_link: reorder section .comment
---> bfd_elf_final_link: output local symbols for section .text
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: _bfd_default_link_order()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_elf_final_link: elf_link_input_bfd()
---> bfd_set_error: bfd_error_nonrepresentable_section
---> bfd_elf_final_link: ... failed
---> bfd_elf_final_link: error return
---> bfd_elf_final_link: return FALSE
/usr/local/gcc-4.7.1/m68k-uclinux/bin/ld.real: final link failed:
Nonrepresentable section on output
collect2: error: ld returned 1 exit status

I have to move on to more pressing problems.  Since I don't need Transactional
Memory support anyway, I'm happy enough to use my patch which disables it for
uClinux and move on.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
                   ` (2 preceding siblings ...)
  2012-09-18 21:43 ` baker at usgs dot gov
@ 2012-09-18 21:53 ` baker at usgs dot gov
  2012-09-18 23:30 ` hp at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-18 21:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #4 from Larry Baker <baker at usgs dot gov> 2012-09-18 21:53:03 UTC ---
Created attachment 28218
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28218
Hacked binutils 1.22 bfd/elflink.c

I added a bunch of debugging output to bfd/elflink.c to find out where the link
failure occurs.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
                   ` (3 preceding siblings ...)
  2012-09-18 21:53 ` baker at usgs dot gov
@ 2012-09-18 23:30 ` hp at gcc dot gnu.org
  2012-09-19  0:05 ` baker at usgs dot gov
  2012-09-19  0:15 ` baker at usgs dot gov
  6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu.org @ 2012-09-18 23:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #5 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2012-09-18 23:30:23 UTC ---
This seems to be just a problem with flawed elf2flt linker placement of
orphaned sections.  But, I can't find where -elf2flt is handled in FSF
binutils; you need to talk to whomever is in charge of the local uclinux linker
patches.

For a linker fix, either add a "${RELOCATING+*(.tm_clone_table)}" in the .text
or .data output section of the default linker script or improve the elf2flt
orphaned section placement, similar to what I did in
<http://sourceware.org/ml/binutils/2012-09/msg00101.html> as a partial fix for
PR54373. (It fixes the main problem, but I found others.)  Generic ELF already
has good enough orphaned-section placement that no real ELF target has any
problem with .tm_clone_table actually being an orphaned section for all
targets.

Of course, an alternative is to cover up by disabling transactional memory,
likely the most pragmatic solution; I'm guessing TM is of little interest to
uclinux targets. :)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
                   ` (4 preceding siblings ...)
  2012-09-18 23:30 ` hp at gcc dot gnu.org
@ 2012-09-19  0:05 ` baker at usgs dot gov
  2012-09-19  0:15 ` baker at usgs dot gov
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-19  0:05 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #6 from Larry Baker <baker at usgs dot gov> 2012-09-19 00:05:38 UTC ---
Hans-Peter,

Thanks for looking at this.

This seems a bit more complicated than "just a problem with flawed elf2flt
linker placement of
orphaned sections" since elf2flt/ld.real work fine when creating flat binaries
for cases other than -msep-data/-fPIC.  That implies that they must be handling
the orphaned .tm_clone_table section for those cases (a bunch of different
-mcpu's).  I don't know where to look to find out how -msep-data/-fPIC are
handled differently, and thus, why those fail.

FYI: For the latest tests I ran, I used a vanilla binutils 1.22 distribution --
no uClinux linker patches.  I also used the latest elf2flt from
www.uclinux.org.

I also cannot find where -elf2flt is recognized/handled by collect2.  I have no
idea what collect2 does.  I tracked down the location of the error to ld.real,
which is the binutils ld, renamed to ld.real by the elf2flt package "make
install".

When I read about TM support, it sounded like it might be preferable to
pthreads.  If that is so, then I expect uClinux would be a good candidate for
TM.

I will take a look at your fix.  The details of how to write ld scripts and
such are beyond my current understanding of the process.  I learn what I have
to when I encounter a problem.  I was hoping someone that knows what to look
for would see what I have provided and instantly figure out what the problem
is. :)

Larry Baker


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/54584] m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES
  2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
                   ` (5 preceding siblings ...)
  2012-09-19  0:05 ` baker at usgs dot gov
@ 2012-09-19  0:15 ` baker at usgs dot gov
  6 siblings, 0 replies; 8+ messages in thread
From: baker at usgs dot gov @ 2012-09-19  0:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54584

--- Comment #7 from Larry Baker <baker at usgs dot gov> 2012-09-19 00:15:22 UTC ---
(In reply to comment #6)

> FYI: For the latest tests I ran, I used a vanilla binutils 1.22 distribution --
> no uClinux linker patches.  I also used the latest elf2flt from
> www.uclinux.org.

binutils 1.22 is a typo -- I meant to say binutils 2.22.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-09-19  0:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-14 20:44 [Bug target/54584] New: m68k-uclinux error: Link tests are not allowed after GCC_NO_EXECUTABLES baker at usgs dot gov
2012-09-15  0:39 ` [Bug target/54584] " baker at usgs dot gov
2012-09-18  2:45 ` baker at usgs dot gov
2012-09-18 21:43 ` baker at usgs dot gov
2012-09-18 21:53 ` baker at usgs dot gov
2012-09-18 23:30 ` hp at gcc dot gnu.org
2012-09-19  0:05 ` baker at usgs dot gov
2012-09-19  0:15 ` baker at usgs dot gov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).