aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/elf32-i386.c1
-rw-r--r--bfd/elf64-x86-64.c3
3 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b9849f8..735a0ba 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
2012-03-16 Roland McGrath <mcgrathr@google.com>
* config.bfd: Handle x86_64-*-nacl*.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 4ae2166..f35e3c22 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -3503,6 +3503,7 @@ elf_i386_relocate_section (bfd *output_bfd,
return FALSE;
}
else if (!info->executable
+ && !SYMBOLIC_BIND (info, h)
&& h->type == STT_FUNC
&& ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)
{
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index f2f803a..cc5ee42 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3464,8 +3464,9 @@ elf_x86_64_relocate_section (bfd *output_bfd,
/* Check to make sure it isn't a protected function symbol
for shared library since it may not be local when used
as function address. */
- if (info->shared
+ if (!info->executable
&& h
+ && !SYMBOLIC_BIND (info, h)
&& h->def_regular
&& h->type == STT_FUNC
&& ELF_ST_VISIBILITY (h->other) == STV_PROTECTED)