Bug 1559234

Summary: LLVM regression test test/tools/gold/X86/comdat.ll fails with binutils 2.30
Product: [Fedora] Fedora Reporter: Tom Stellard <tstellar>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ajax, aoliva, davejohansen, dmalcolm, dvlasenk, jakub, jistone, nickc, petersen, scottt.tw, siddharth.kde, tschelle, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://sourceware.org/bugzilla/show_bug.cgi?id=22994
Whiteboard:
Fixed In Version: binutils-2.30-14.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-02 16:17:13 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: 1559315    
Attachments:
Description Flags
Test Input 1
none
Test Input 2
none
Test script none

Description Tom Stellard 2018-03-22 03:56:48 UTC
The test/tools/gold/X86/comdat.ll regression test fails with  binutils-2.30-13.fc29.x86_64 installed, but passes with binutils-2.29-13.fc27.x86_64.

Comment 1 Tom Stellard 2018-03-22 04:03:02 UTC
Created attachment 1411580 [details]
Test Input 1

Comment 2 Tom Stellard 2018-03-22 04:03:46 UTC
Created attachment 1411581 [details]
Test Input 2

Comment 3 Tom Stellard 2018-03-22 04:04:17 UTC
Created attachment 1411582 [details]
Test script

Comment 4 Tom Stellard 2018-03-22 04:09:41 UTC
To reproduce this issue on rawhide:

dnf install llvm binutils
bash build.sh

If the test executes correctly, then the f1 symbol should be marked STV_PROTECT, and the script should output a symbol entry that looks like:

Symbol {
  Name: f1 (113)
  Value: 0x4D0
  Size: 6
  Binding: Weak (0x2)
  Type: Function (0x2)
  Other [ (0x3)
    STV_PROTECTED (0x3)
  ]
  Section: .text (0x5)
}

However, with binutils-2.30 the symbol is not marked STV_PROTECT and the symbol entry looks like:

 Symbol {
    Name: f1 (135)
    Value: 0x5B0
    Size: 6
    Binding: Weak (0x2)
    Type: Function (0x2)
    Other: 0
    Section: .text (0x8)
  }

Comment 5 Nick Clifton 2018-03-22 12:28:38 UTC
(In reply to Tom Stellard from comment #3)

Hi Tom,

  This is just a quick note to sat that this problem appears to be
  specific to the gold linker.  If you use ld.bfd then the problem
  goes away.

  I will file a bug report with the FSF binutils bugzilla system 
  and see if that produces any results.

Cheers
  Nick

Comment 6 Nick Clifton 2018-03-22 12:41:13 UTC
Bug report submitted upstream:

  https://sourceware.org/bugzilla/show_bug.cgi?id=22994

Comment 7 Tom Stellard 2018-03-22 13:18:20 UTC
(In reply to Nick Clifton from comment #6)
> Bug report submitted upstream:
> 
>   https://sourceware.org/bugzilla/show_bug.cgi?id=22994

This issue was previously reported too: http://sourceware.org/bugzilla/show_bug.cgi?id=22868

Comment 8 Nick Clifton 2018-03-22 21:07:20 UTC
Hi Tom,

  Thanks - I have imported the patch from 22868.  Please try:
  binutils-2.30-14.fc29 and let me know if there are any more
  problems.

Cheers
  Nick

Comment 9 Tom Stellard 2018-04-02 16:17:13 UTC
Confirmed the failures are fixed in llvm-6.0.0-11.fc29 whith binutils-2.30-14.fc29.