Bug 23123

Summary: powerpc32 gcc test g++.dg/ext/attr-ifunc-[34]
Product: binutils Reporter: Alan Modra <amodra>
Component: ldAssignee: Alan Modra <amodra>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.30   
Target Milestone: ---   
Host: Target: powerpc-linux
Build: Last reconfirmed:

Description Alan Modra 2018-04-27 07:27:24 UTC
These tests fail on ppc32 if using master or 2.30 branch linkers, due to a missing ifunc relocation.
Comment 1 Sourceware Commits 2018-04-27 09:26:09 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=04383fd15b3b82d824df9c72e3ade88c43bfb5ac

commit 04383fd15b3b82d824df9c72e3ade88c43bfb5ac
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Apr 27 15:46:40 2018 +0930

    PR23123, PowerPC32 ifunc regression
    
    Two of the gcc ifunc tests fail for ppc32, due to my pr22374 fix being
    a little too enthusiastic in trimming PLT entries.  ppc64 doesn't have
    the same failures because ppc64_elf_check_relocs happens to set
    needs_plt for any ifunc reloc.
    
    	PR 23123
    	PR 22374
    	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
    	relocs for ifuncs.
    	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
Comment 2 Sourceware Commits 2018-04-27 09:33:12 UTC
The binutils-2_30-branch branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=69bc498952e7e477d6f96f3b6f900a6112e82350

commit 69bc498952e7e477d6f96f3b6f900a6112e82350
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Apr 27 15:46:40 2018 +0930

    PR23123, PowerPC32 ifunc regression
    
    Two of the gcc ifunc tests fail for ppc32, due to my pr22374 fix being
    a little too enthusiastic in trimming PLT entries.  ppc64 doesn't have
    the same failures because ppc64_elf_check_relocs happens to set
    needs_plt for any ifunc reloc.
    
    	PR 23123
    	PR 22374
    	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
    	relocs for ifuncs.
    	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
    
    (cherry picked from commit 04383fd15b3b82d824df9c72e3ade88c43bfb5ac)
Comment 3 Alan Modra 2018-04-28 10:46:05 UTC
Fixed