81e8046 x86-64: Move PIC check for PC-relative relocations back

Authored and Committed by H.J. Lu 4 years ago
    x86-64: Move PIC check for PC-relative relocations back
    
    commit 83924b3846361f2f76f9a6e7b5afa01c0eebbd4f
    Author: H.J. Lu <hjl.tools@gmail.com>
    Date:   Tue Feb 5 18:45:23 2019 -0800
    
        x86-64: Restore PIC check for PCREL reloc against protected symbol
    
    moved PIC check for PC-relative relocations to elf_x86_64_check_relocs.
    Since linker defined symbols may not be processed at the time, we need
    to move the check back to elf_x86_64_relocate_section.
    
    bfd/
    
    	PR ld/24905
    	* elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
    	PC-relative relocations back to ...
    	(elf_x86_64_relocate_section): Here.
    
    ld/
    
    	PR ld/24905
    	* testsuite/ld-x86-64/pr24905-x32.d: New file.
    	* testsuite/ld-x86-64/pr24905.d: Likewise.
    	* testsuite/ld-x86-64/pr24905.s: Likewise.
    	* testsuite/ld-x86-64/pr24905.t: Likewise.
    	* testsuite/ld-x86-64/x86-64.exp: Run pr24905 and pr24905-x32.
    
        
file modified
+7 -0
file modified
+70 -79
file modified
+9 -0