Bug 689738

Summary: /usr/bin/ld: internal error, aborting at elf64-s390.c line 3193 in elf_s390_finish_dynamic_symbol
Product: Red Hat Enterprise Linux 6 Reporter: Petr Muller <pmuller>
Component: binutilsAssignee: Andreas Schwab <schwab>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: jan.kratochvil, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-26 13:22:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Muller 2011-03-22 10:30:55 UTC
Description of problem:
Compiling one testcase from gdb testsuite fails with ld internal error. This happens just on s390x.

# gcc ./gdb.base/gnu-ifunc.c /root/rpmbuild/BUILD/gdb-7.2/gdb/testsuite/gdb.base/gnu-ifunc-lib.o -g -lm
/usr/bin/ld: BFD version 2.20.51.0.2-5.11.el6 20091009 internal error, aborting at elf64-s390.c line 3193 in elf_s390_finish_dynamic_symbol

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

collect2: ld returned 1 exit status

Version-Release number of selected component (if applicable):
both RHEL6.0 (binutils-2.20.51.0.2-5.11.el6.s390x) and RHEL6.1 candidate (binutils-2.20.51.0.2-5.19.el6.s390x)

How reproducible:
always on RHEL6

Steps to Reproduce:
1. install gdb src rpm, eg. gdb-7.2-46.el6.src.rpm
2. cd /root/rpmbuild/BUILD/gdb-7.2/gdb/testsuite
3. runtest --tool=gdb gdb.base/gnu-ifunc.exp
  
Actual results:
gdb compile failed, /usr/bin/ld: BFD version 2.20.51.0.2-5.19.el6 20091009 internal error, aborting at elf64-s390.c line 3193 in elf_s390_finish_dynamic_symbol

Expected results:
no internal error

Additional info:
I can extract the testcase from the testsuite if you wish.

I am proposing this to 6.1 for the case there is a respin, but feel free to postpone it to 6.2 - it's not a regression and it architecture dependent.

Comment 1 Andreas Schwab 2011-03-22 11:01:08 UTC
s390 has no support for IFUNC at all.  This test should be disabled in gdb.

Comment 2 Jan Kratochvil 2011-03-22 13:16:22 UTC
STT_GNU_IFUNC works if it is in a shared library.  Not if it is in the executable itself:

binutils-2.20.51.0.2-5.19.el6.s390x
git://sourceware.org/git/archer.git
archer-jankratochvil-ifunc
auto-s390-001.ss.eng.bos.redhat.com
/root/jkratoch/redhat/archer/gdb/testsuite

Running ./gdb.base/gnu-ifunc.exp ...
PASS: gdb.base/gnu-ifunc.exp: continue to breakpoint: break-at-call
PASS: gdb.base/gnu-ifunc.exp: p gnu_ifunc (3)
PASS: gdb.base/gnu-ifunc.exp: step
PASS: gdb.base/gnu-ifunc.exp: continue to break-at-nextcall
PASS: gdb.base/gnu-ifunc.exp: continue to breakpoint: nextcall gnu_ifunc
PASS: gdb.base/gnu-ifunc.exp: nextcall gnu_ifunc skipped
PASS: gdb.base/gnu-ifunc.exp: p gnu_ifunc executing
PASS: gdb.base/gnu-ifunc.exp: info sym gnu_ifunc executing
PASS: gdb.base/gnu-ifunc.exp: info addr gnu_ifunc
PASS: gdb.base/gnu-ifunc.exp: info sym <gnu_ifunc-address>
gdb compile failed, /usr/bin/ld: BFD version 2.20.51.0.2-5.19.el6 20091009 internal error, aborting at elf64-s390.c line 3193 in elf_s390_finish_dynamic_symbol

Comment 3 RHEL Program Management 2011-04-04 01:49:57 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 4 Petr Muller 2011-04-04 12:33:13 UTC
Proposing for 6.2

Comment 5 Andreas Schwab 2011-05-26 13:22:49 UTC
s390 needs to grow ifunc support first.