Bug 1679074

Summary: binutils: ppc64le attr-ifunc-4.c broken by linker
Product: [Fedora] Fedora Reporter: Jakub Jelinek <jakub>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: aoliva, bugproxy, dan, dvlasenk, fweimer, hannsj_uhl, jakub, nickc
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: ppc64le   
OS: Linux   
Whiteboard:
Fixed In Version: binutils-2.31.1-24.fc30, binutils-2.31.1-29.fc29 binutils-2.31.1-24.fc29 binutils-2.31.1-29.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-23 02:56:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1071880    

Description Jakub Jelinek 2019-02-20 10:09:06 UTC
gcc in rawhide doesn't build anymore, as it is stuck in attr-ifunc-4.c test taking forever.  Previously, the test has been just failing (usually segfault) in f29 and f30, but not in f28.

The test is:
#include <stdio.h>

static int implementation (void)
{
  printf ("'ere I am JH\n");
  return 0;
}

static __typeof__ (implementation)* resolver (void)
{
  return implementation;
}

static int magic (void) __attribute__ ((ifunc ("resolver")));

int main ()
{
  return magic () != 0;
}
compiled with -O0 on ppc64le.
Florian found https://sourceware.org/bugzilla/show_bug.cgi?id=23937
which says the IRELATIVE relocation should not use the .localentry address,
but it is still happening:
gcc -o attr-ifunc-4 attr-ifunc-4.c; rpm -q binutils; readelf -Wa attr-ifunc-4 | grep 'IRELATIVE\|resolver\|magic'
binutils-2.31.1-22.fc30.ppc64le
0000000010020028  00000000000000f8 R_PPC64_IRELATIVE                         10000698
    58: 0000000010000690    56 FUNC    LOCAL  DEFAULT   12 resolver 	[<localentry>: 8] 
    59: 0000000010000690    56 IFUNC   LOCAL  DEFAULT   12 magic 	[<localentry>: 8] 

So, is the sw#23937 bugfix in our binutils, or what is going on?
This is quite a blocker for gcc in rawhide.

Comment 1 Florian Weimer 2019-02-20 10:12:44 UTC
Our binutils is based on 2.31.1, which predates the fix on the upstream 2.31 release branch.

Comment 2 Nick Clifton 2019-02-20 14:02:57 UTC
Fixed in binutils-2.31.1-24.fc30 and binutils-2.31.1-29.fc29.
Rawhide does not need a fix as it has been rebased to the 2.32 sources.

Comment 3 Dan HorĂ¡k 2019-03-18 10:03:33 UTC
Nick, please make updates for the new builds in https://bodhi.fedoraproject.org/

Comment 4 Fedora Update System 2019-03-18 11:02:33 UTC
binutils-2.31.1-29.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-0bd13cd694

Comment 5 Fedora Update System 2019-03-18 11:02:41 UTC
binutils-2.31.1-24.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8c479311d9

Comment 6 Nick Clifton 2019-03-18 11:03:13 UTC
Done.

Comment 7 Fedora Update System 2019-03-19 04:44:11 UTC
binutils-2.31.1-24.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8c479311d9

Comment 8 Fedora Update System 2019-03-21 19:10:28 UTC
binutils-2.31.1-29.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-0bd13cd694

Comment 9 Fedora Update System 2019-03-23 02:56:44 UTC
binutils-2.31.1-24.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2019-03-29 19:17:32 UTC
binutils-2.31.1-29.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.