bfd/
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Mar 2008 22:26:23 +0000 (22:26 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 16 Mar 2008 22:26:23 +0000 (22:26 +0000)
commit41bed6dd8a0e8e81d94fa4d1e552ed3b3c7f206f
tree4bedfd82ca5af4b5edaf96e2e066f13a2bcc5b48
parentf01be29bbc6ef5fd011675bd0da09ab1f7aea030
bfd/

2008-03-16  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/5789
PR ld/5943
* elf32-i386.c  (elf_i386_relocate_section): Issue an error
for R_386_GOTOFF relocaton against undefined hidden/internal
symbols when building a shared object.

* elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
relocaton against undefined hidden/internal symbols when
building a shared object.
(elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
is referenced locally, but isn't defined in a regular file.

ld/testsuite/

2008-03-16  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/5789
PR ld/5943
* ld-i386/hidden1.d: New.
* ld-i386/hidden1.s: Likewise.
* ld-i386/hidden2.d: Likewise.
* ld-i386/hidden2.s: Likewise.
* ld-i386/hidden3.d: Likewise.
* ld-i386/hidden4.s: Likewise.
* ld-i386/protected1.d: Likewise.
* ld-i386/protected1.s: Likewise.
* ld-i386/protected2.d: Likewise.
* ld-i386/protected2.s: Likewise.
* ld-i386/protected3.d: Likewise.
* ld-i386/protected3.s: Likewise.
* ld-x86-64/hidden1.d: Likewise.
* ld-x86-64/hidden1.s: Likewise.
* ld-x86-64/hidden2.d: Likewise.
* ld-x86-64/hidden2.s: Likewise.
* ld-x86-64/hidden3.d: Likewise.
* ld-x86-64/hidden3.s: Likewise.
* ld-x86-64/protected1.d: Likewise.
* ld-x86-64/protected1.s: Likewise.
* ld-x86-64/protected2.d: Likewise.
* ld-x86-64/protected2.s: Likewise.
* ld-x86-64/protected3.d: Likewise.
* ld-x86-64/protected3.s: Likewise.

* ld-i386/i386.exp: Run hidden1, hidden2, hidden3, protected1,
protected2 and protected3.
* ld-x86-64/x86-64.exp: Likewise.
30 files changed:
bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ChangeLog
ld/testsuite/ld-i386/hidden1.d [new file with mode: 0644]
ld/testsuite/ld-i386/hidden1.s [new file with mode: 0644]
ld/testsuite/ld-i386/hidden2.d [new file with mode: 0644]
ld/testsuite/ld-i386/hidden2.s [new file with mode: 0644]
ld/testsuite/ld-i386/hidden3.d [new file with mode: 0644]
ld/testsuite/ld-i386/hidden3.s [new file with mode: 0644]
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/protected1.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected1.s [new file with mode: 0644]
ld/testsuite/ld-i386/protected2.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected2.s [new file with mode: 0644]
ld/testsuite/ld-i386/protected3.d [new file with mode: 0644]
ld/testsuite/ld-i386/protected3.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden1.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden2.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden2.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden3.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/hidden3.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected1.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected1.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected2.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected2.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected3.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/protected3.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp