Handle relocation against protected function for -Bsymbolic
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Mar 2012 18:16:38 +0000 (18:16 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Mar 2012 18:16:38 +0000 (18:16 +0000)
commitbdb892b99584bfd481ed23c90ad7ceafb31ca791
treefa9fe2766f8ceecd5d85314aa12e6acb635a3cff
parente278ad5be65114f92eba2b2609bddd7c058376a8
Handle relocation against protected function for -Bsymbolic

bfd/

2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13880
* elf32-i386.c (elf_i386_relocate_section): Don't issue an error
for R_386_GOTOFF relocation against protected function if
SYMBOLIC_BIND is true.

* elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
error for R_X86_64_GOTOFF64 relocation against protected function
when building executable or SYMBOLIC_BIND is true.

ld/testsuite/

2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/13880
* ld-i386/i386.exp: Run protected4 and protected5.
* ld-x86-64/x86-64.exp: Likewise.

* ld-i386/protected4.d: New.
* ld-i386/protected4.s: Likewise.
* ld-i386/protected5.d: Likewise.
* ld-i386/protected5.s: Likewise.
* ld-x86-64/protected4.d: Likewise.
* ld-x86-64/protected4.s: Likewise.
* ld-x86-64/protected5.d: Likewise.
* ld-x86-64/protected5.s: Likewise.
14 files changed:
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/protected4.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected4.s [new file with mode: 0644]
ld/testsuite/ld-i386/protected5.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected5.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected4.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected4.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected5.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected5.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp