Bug 472306

Summary: LD generated coredump
Product: [Fedora] Fedora Reporter: Zdenek Kabelac <zkabelac>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 13CC: jakub, jan.kratochvil, nickc
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 14:02:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zdenek Kabelac 2008-11-19 22:37:57 UTC
Description of problem:

Accidently I've tried to link 32bit compiled objects with 64bit fedora and I've got a coredump: Here is backtrace:


#0  mempcpy () at ../sysdeps/x86_64/memcpy.S:102
#1  0x00007f25c680d69e in _IO_default_xsputn (f=0x819c30, data=<value optimized out>, n=24)
    at genops.c:468
#2  0x00007f25c680a95f in _IO_new_file_xsputn (f=0x819c30, data=0x0, n=24) at fileops.c:1372
#3  0x00007f25c68004e8 in _IO_fwrite (buf=0x0, size=1, count=24, fp=0x819c30) at iofwrite.c:45
#4  0x00007f25c6d4d38b in cache_bwrite (abfd=<value optimized out>, where=0x0, nbytes=24) at cache.c:347
#5  0x00007f25c6d4cbcf in bfd_bwrite (ptr=0x0, size=24, abfd=0x696550) at bfdio.c:191
#6  0x00007f25c6d7635e in _bfd_elf_set_section_contents (abfd=0x696550, section=0x6a1b18, location=0x0, 
    offset=10344, count=24) at elf.c:7357
#7  0x00007f25c6d54922 in bfd_set_section_contents (abfd=0x696550, section=0x6a1b18, location=0x0, 
    offset=0, count=24) at section.c:1363
#8  0x00007f25c6d88e9a in bfd_elf_final_link (abfd=0x696550, info=0x677e80) at elflink.c:10954
#9  0x00000000004184cf in ldwrite () at ldwrite.c:567
#10 0x00000000004179a0 in main (argc=52, argv=0x7fffcf235028) at ../ld/ldmain.c:487


I'm not really sure whether it make sence to fix this bug - but coredump is always unwanted feature.


Version-Release number of selected component (if applicable):
binutils-2.18.50.0.9-7.fc10.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Bug Zapper 2008-11-26 05:38:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Nick Clifton 2008-11-26 10:51:59 UTC
Hi Zdenek,

  I need a way to reproduce this problem in order to be able to investigate it.  I did try creating an 32-bit hello-world object file and then linking it on a 64-bit system, but all I got was an error message:

  i386 architecture of input file 'hello.o' is incompatible with i386:x86_64 output

Cheers
  Nick

Comment 3 Jan Kratochvil 2008-11-26 13:46:54 UTC
I expect Zdenek used `gcc -m32' which automatically runs `ld -m elf_i386'.  You need to have glibc-devel.i386 and libgcc.i386 installed (Fedora is multilib).
Still the problem is unreproducible for me.

Comment 4 Zdenek Kabelac 2008-12-02 11:35:52 UTC
Well the problem appears when I do not properly delete build tree from project which is build via nfs with local qemu guest running 32bit debian unstable gcc 4.3.2.

and I'm also getting this error:

gcc -shared -Wl,-soname,libmy.so.1.02 \
	-g -O2 -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security  -g -fno-omit-frame-pointer -Wl,--version-script,.export.sym myobjs.o -lrt -ldl -lncurses  -o libmy.so
/usr/bin/ld: can not read symbols: File truncated
/usr/bin/ld: BFD version 2.19.50.0.1-8.fc11 20081007 internal error, aborting at merge.c line 873 in _bfd_merged_section_offset

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

Comment 5 Bug Zapper 2009-11-18 08:54:30 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Zdenek Kabelac 2009-12-07 00:05:24 UTC
Bug is still present with Fedora Rawhide:

binutils-2.20.51.0.2-7.fc13.x86_64

Comment 7 Nick Clifton 2010-02-02 13:52:14 UTC
Hi Zdenek,

  I have just updated the rawhide binutils rpm with a fix for mixed x86 and x86_64 binaries (BZ 487472).  This *might*  also fix the problems that you have experienced with the linker, so would you care to run your tests again please ?

Cheers
  Nick

Comment 8 Bug Zapper 2010-03-15 12:10:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Bug Zapper 2011-06-02 18:23:47 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Bug Zapper 2011-06-27 14:02:25 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.