bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc-3.3 with binutils-2.9.1


From: James Hanley
Subject: gcc-3.3 with binutils-2.9.1
Date: Thu, 31 Jul 2003 12:57:37 -0700 (PDT)

I'm trying to build gcc-3.3 with binutils-2.9.1 and I am running into an
issue with the bootstrap, and I beleive the problem is the ld.  The crux
of the the issue is that I get a SEGV when make runs gengenrtl.

On solaris 8 I ran configure for gcc with these options
../gcc-3.3/configure --with-gnu-ld --with-gnu-as

snip of the make:
Bootstrapping the compiler
gmake[1]: Entering directory
`/home/jhanley/projects/gnu_cross_compiler/gcc-sparc-elf/gcc' gmake
CC="gcc" libdir=/usr/local/lib LANGUAGES="c " \
        CFLAGS="-g "
MAKEINFO="/home/jhanley/projects/gnu_cross_compiler/gcc-3.3/missing
makeinfo --no-split" \
        MAKEINFOFLAGS="" COVERAGE_FLAGS=
gmake[2]: Entering directory
`/home/jhanley/projects/gnu_cross_compiler/gcc-sparc-elf/gcc'
gcc -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
-DHAVE_CONFIG_H -DGENERATOR_FILE -o gengenrtl \
 gengenrtl.o ../libiberty/libiberty.a ./gengenrtl -h > tmp-genrtl.h
Segmentation Fault - core dumped gmake[2]: *** [s-genrtl] Error 139
gmake[2]: Leaving directory
`/home/jhanley/projects/gnu_cross_compiler/gcc-sparc-elf/gcc'
gmake[1]: *** [stage1_build] Error 2
gmake[1]: Leaving directory
`/home/jhanley/projects/gnu_cross_compiler/gcc-sparc-elf/gcc'
gmake: *** [bootstrap] Error 2
address@hidden:

When doing some further checking and examination of the core file I get
the following from dbx:

address@hidden: /opt/SUNWspro/bin/dbx ./gcc/gengenrtl ./gcc/core
Reading gengenrtl core file header read successfully Reading ld.so.1
Reading libc.so.1 Reading libdl.so.1 Reading libc_psr.so.1 program
terminated by signal SEGV (no mapping at the fault address)  0x0001065c:
__do_global_dtors_aux+0x0038: ld [%o1], %o0
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx) where
=>[1] __do_global_dtors_aux(0xff29bbe0, 0x1b6, 0xff3a06f4, 0xff3e66b4,
0x0, 0x1), at 0x1065c
  [2] 0x11850(0x0, 0xff3420a0, 0xff3a06f4, 0xff3e66b4, 0x22768,
0xff29bc48), at 0x1184f
  [3] _exithandle(0xff3420ac, 0xff33e5f0, 0xff3420b8, 0x23870, 0x22768,
0xff33c000), at 0xff29bc54
  [4] exit(0x0, 0xffbede3c, 0xffbede48, 0x239a0, 0x0, 0x0), at 0xff31f718
(/opt/SUNWspro/bin/../WS6U2/bin/sparcv9/dbx)

This sounds familier to a problem I saw at
http://mail.gnu.org/archive/html/bug-gnu-utils/2001-06/msg00226.html

when calling /usr/ccs/bin/ld with the same args that
/usr/local/sparc-sun-solaris2.8/bin/ld was called with in make, the
gengenrtl executable will now exit normally.

This is great, but only a work around, since the same problem was found
with make tried to run gengtype.  Not to mention that one shoudl be able
to link gcc using the gnu bin-utils.

I've also included what nm has dumped out for the gnu ld-ed and sun ld-ed
gengenrtl.

address@hidden: nm --extern-only --numeric-sort \
        gcc/gengenrtl.gnuLDed  > gcc_gengenrtl.gnuLDed
address@hidden: nm --extern-only --numeric-sort \
        gcc/gengenrtl.sunLDed  > gcc_gengenrtl.sunLDed
address@hidden: /usr/local/bin/diff -y gcc_gengenrtl.*
         U __deregister_frame_info              U __deregister_frame_info
         U __flsbuf@@SYSVABI_1.3     |          U __flsbuf
         U __register_frame_info                U __register_frame_info
         U _exit@@SYSVABI_1.3        |          U _exit
         U abort@@SYSVABI_1.3        |          U abort
         U atexit@@SYSVABI_1.3       |          U atexit
         U exit@@SYSVABI_1.3         |          U exit
         U fclose@@SYSVABI_1.3       |          U fclose
         U fflush@@SYSVABI_1.3       |          U fflush
         U printf@@SYSVABI_1.3       |          U printf
         U puts@@SYSVABI_1.3         |          U puts
         U strchr@@SYSVABI_1.3       |          U strchr
         U strcmp@@SYSVABI_1.3       |          U strcmp
         U strlen@@SYSVABI_1.3       |          U strlen
0001058c ? _init                     | 000105c4 T _start
000105a8 T _start                    | 000116e8 T main
000116cc T main                      | 00011868 ? _init
0001184c A _etext                    | 00011884 ? _fini
0001184c ? _fini                     | 00011898 R _lib_version
00011860 R _lib_version              | 000136cd R _etext
000236b4 A _PROCEDURE_LINKAGE_TABLE_ | 000236d0 ? _GLOBAL_OFFSET_TABLE_
00023790 A _GLOBAL_OFFSET_TABLE_     | 000236f0 ? _PROCEDURE_LINKAGE_TABLE_
000237b8 A _DYNAMIC                  | 000237cc ?  _DYNAMIC
00023858 A __bss_start               | 000238a0 ?  _edata
00023858 A _edata                    | 00023b50 B _environ
00023860 B __iob@@SYSVABI_1.3        | 00023b50 W environ
000239a0 B _environ@@SYSVABI_1.3     | 00023b58 B __iob
00023c4c A _end                      | 00023b58 W _iob
                                     > 00023c98 B _end
address@hidden:

The left is from linking gengenrtl using bin-utils ld, and the right is
from using sun ld

Thankyou in advance for any help for pointing me in the right direction.
-Jim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]