aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-04-09 21:36:24 +0930
committerAlan Modra <amodra@gmail.com>2015-04-10 19:16:47 +0930
commit8d2ea2a80abad66250f2f4a1d38e3b8c796147f8 (patch)
tree556afca02e04ecd7cde4137f5915040476984198 /bfd
parent8d707a12ef51ba5f4c3c6a52532e903da7a56b8b (diff)
downloadfsf-binutils-gdb-8d2ea2a80abad66250f2f4a1d38e3b8c796147f8.zip
fsf-binutils-gdb-8d2ea2a80abad66250f2f4a1d38e3b8c796147f8.tar.gz
fsf-binutils-gdb-8d2ea2a80abad66250f2f4a1d38e3b8c796147f8.tar.bz2
Revert "Add extern_protected_data and set it for x86"
This reverts commit ca3fe95e469b9daec153caa2c90665f5daaec2b5.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog14
-rw-r--r--bfd/elf-bfd.h4
-rw-r--r--bfd/elf32-i386.c1
-rw-r--r--bfd/elf64-x86-64.c1
-rw-r--r--bfd/elflink.c9
-rw-r--r--bfd/elfxx-target.h6
6 files changed, 18 insertions, 17 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 95cf8d7..f1d9343 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,17 @@
+2015-04-10 Alan Modra <amodra@gmail.com>
+
+ Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
+ PR ld/pr15228
+ PR ld/pr17709
+ * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
+ * elf32-i386.c (elf_backend_extern_protected_data): Delete.
+ * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
+ * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
+ extern_protected_data test.
+ (_bfd_elf_symbol_refs_local_p): Likewise.
+ * elfxx-target.h (elf_backend_extern_protected_data): Delete.
+ (elfNN_bed): Delete elf_backend_extern_protected_data init.
+
2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
* compress.c (bfd_compress_section_contents): Update comments.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index e435e52..8def41b 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1363,10 +1363,6 @@ struct elf_backend_data
in length rather than sec->size in length, if sec->rawsize is
non-zero and smaller than sec->size. */
unsigned caches_rawsize : 1;
-
- /* Address of protected data defined in the shared library may be
- external, i.e., due to copy relocation. */
- unsigned extern_protected_data : 1;
};
/* Information about reloc sections associated with a bfd_elf_section_data
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 52f4d33..3f16fc1 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -5292,7 +5292,6 @@ elf_i386_add_symbol_hook (bfd * abfd,
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
#define elf_backend_plt_alignment 4
-#define elf_backend_extern_protected_data 1
/* Support RELA for objdump of prelink objects. */
#define elf_info_to_howto elf_i386_info_to_howto_rel
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index ab72306..6eb8471 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -5868,7 +5868,6 @@ static const struct bfd_elf_special_section
#define elf_backend_got_header_size (GOT_ENTRY_SIZE*3)
#define elf_backend_rela_normal 1
#define elf_backend_plt_alignment 4
-#define elf_backend_extern_protected_data 1
#define elf_info_to_howto elf_x86_64_info_to_howto
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 022a535..183b313 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2673,9 +2673,7 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info,
/* Increment the size of DYNBSS to make room for the symbol. */
dynbss->size += h->size;
- /* No error if extern_protected_data is true. */
- if (h->protected_def
- && !get_elf_backend_data (dynbss->owner)->extern_protected_data)
+ if (h->protected_def)
{
info->callbacks->einfo
(_("%P: copy reloc against protected `%T' is invalid\n"),
@@ -2839,9 +2837,8 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
bed = get_elf_backend_data (hash_table->dynobj);
- /* If extern_protected_data is false, STV_PROTECTED non-function
- symbols are local. */
- if (!bed->extern_protected_data && !bed->is_function_type (h->type))
+ /* STV_PROTECTED non-function symbols are local. */
+ if (!bed->is_function_type (h->type))
return TRUE;
/* Function pointer equality tests may require that STV_PROTECTED
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 0085d6c..9bfb6c8 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -117,9 +117,6 @@
#ifndef elf_backend_caches_rawsize
#define elf_backend_caches_rawsize 0
#endif
-#ifndef elf_backend_extern_protected_data
-#define elf_backend_extern_protected_data 0
-#endif
#ifndef elf_backend_stack_align
#define elf_backend_stack_align 16
#endif
@@ -809,8 +806,7 @@ static struct elf_backend_data elfNN_bed =
elf_backend_want_dynbss,
elf_backend_want_p_paddr_set_to_zero,
elf_backend_default_execstack,
- elf_backend_caches_rawsize,
- elf_backend_extern_protected_data
+ elf_backend_caches_rawsize
};
/* Forward declaration for use when initialising alternative_target field. */