NetBSD-Bugs archive

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

toolchain/44031: /usr/bin/ld crashes on a file compiled with /usr/pkg/gcc34/bin/gcc -m32



>Number:         44031
>Category:       toolchain
>Synopsis:       /usr/bin/ld crashes on a file compiled with 
>/usr/pkg/gcc34/bin/gcc -m32
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 03 00:00:00 +0000 2010
>Originator:     Alexander Nasonov
>Release:        NetBSD 5.99.39 amd64
>Organization:
N/A
>Environment:
NetBSD nebeda.localdomain 5.99.39 NetBSD 5.99.39 (GENERIC) #0: Fri Oct 22 
00:29:03 BST 2010  
root%nebeda.localdomain@localhost:/home/alnsn/src/netbsd-current/src/sys/arch/amd64/compile/obj/GENERIC
 amd64

>Description:
I got a crash when building luajit 2 from git repository.

[screen:599.pts-0.nebeda/1 pts/2] PATH=/usr/pkg/gcc34/bin:$PATH gmake
==== Building LuaJIT 2.0.0-beta5 ====
gmake -C src
gmake[1]: Entering directory `/home/alnsn/src/luajit-2.0/src'
HOSTCC    buildvm.o
HOSTCC    buildvm_asm.o
HOSTCC    buildvm_peobj.o
HOSTCC    buildvm_lib.o
HOSTCC    buildvm_fold.o
HOSTLINK  buildvm
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/bin/ld: skipping incompatible 
/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/libgcc.a when searching for 
-lgcc
/usr/bin/ld: skipping incompatible 
/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/libgcc_eh.a when searching 
for -lgcc_eh
/usr/bin/ld: skipping incompatible 
/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/libgcc.a when searching for 
-lgcc
/usr/bin/ld: skipping incompatible 
/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/libgcc_eh.a when searching 
for -lgcc_eh
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crt0.o' is 
incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crti.o' is 
incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/crtbegin.o' is incompatible 
with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file 
`/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/crtend.o' is incompatible 
with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crtn.o' is 
incompatible with i386 output
/usr/bin/ld: error in 
/usr/pkg/gcc34/lib/gcc/x86_64--netbsd5.99.39/3.4.6/crtend.o(.eh_frame); no 
.eh_frame_hdr table will be created.

gmake[1]: *** [buildvm] Error 1
gmake[1]: Leaving directory `/home/alnsn/src/luajit-2.0/src'
gmake: *** [default] Error 2
INT
[screen:599.pts-0.nebeda/1 pts/2] ls ld.core
ls: ld.core: No such file or directory
HUP
[screen:599.pts-0.nebeda/1 pts/2] ls ld.
INT
[screen:599.pts-0.nebeda/1 pts/2] find . -name \*.core
./src/ld.core
[screen:599.pts-0.nebeda/1 pts/2] gdb /usr/bin/ld ./src/ld.core
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64--netbsd"...(no debugging symbols found)

Reading symbols from /usr/lib/libintl.so.1...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libintl.so.1
Reading symbols from /usr/lib/libbfd.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libbfd.so.11
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libc.so.12...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.12
Reading symbols from /usr/libexec/ld.elf_so...(no debugging symbols 
found)...done.
Loaded symbols for /usr/libexec/ld.elf_so


Core was generated by `ld'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f7ffcce66e4 in memcpy () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7ffcce66e4 in memcpy () from /usr/lib/libc.so.12
#1  0x00007f7ffd4a2861 in bfd_get_section_contents () from /usr/lib/libbfd.so.11
#2  0x00007f7ffd49da53 in bfd_generic_get_relocated_section_contents () from 
/usr/lib/libbfd.so.11
#3  0x00007f7ffd49b0bf in bfd_wrapped_link_hash_lookup () from 
/usr/lib/libbfd.so.11
#4  0x00007f7ffd47708a in bfd_elf_final_link () from /usr/lib/libbfd.so.11
#5  0x0000000000415c89 in ldwrite ()
#6  0x00000000004152b6 in main ()

>How-To-Repeat:
 - git pull of luajit 2.
 - comment CC=gcc and uncomment CC=gcc -m32 in src/Makefile
 - execute PATH=/usr/pkg/gcc34/bin:$PATH gmake
>Fix:



Home | Main Index | Thread Index | Old Index