aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elflink.c30
2 files changed, 24 insertions, 14 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f12a610..1220455 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/12365
+ PR ld/14272
+ * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
+ (elf_link_input_bfd): Mark the plugin symbol undefined if it is
+ referenced from a non-IR file.
+
2015-02-06 Nick Clifton <nickc@redhat.com>
PR binutils/17512
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 604cfb6..e8c4ad4 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -2423,20 +2423,6 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
}
else
{
- /* If a plugin symbol is referenced from a non-IR file, mark
- the symbol as undefined, except for symbol for linker
- created section. */
- if (h->root.non_ir_ref
- && (h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- && (h->root.u.def.section->flags & SEC_LINKER_CREATED) == 0
- && h->root.u.def.section->owner != NULL
- && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0)
- {
- h->root.type = bfd_link_hash_undefined;
- h->root.u.undef.abfd = h->root.u.def.section->owner;
- }
-
/* Unfortunately, NON_ELF is only correct if the symbol
was first seen in a non-ELF file. Fortunately, if the symbol
was first seen in an ELF file, we're probably OK unless the
@@ -9807,6 +9793,22 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
s_type = h->type;
+ /* If a plugin symbol is referenced from a non-IR file,
+ mark the symbol as undefined, except for symbol for
+ linker created section. */
+ if (h->root.non_ir_ref
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && (h->root.u.def.section->flags
+ & SEC_LINKER_CREATED) == 0
+ && h->root.u.def.section->owner != NULL
+ && (h->root.u.def.section->owner->flags
+ & BFD_PLUGIN) != 0)
+ {
+ h->root.type = bfd_link_hash_undefined;
+ h->root.u.undef.abfd = h->root.u.def.section->owner;
+ }
+
ps = NULL;
if (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)