aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-07-21 16:13:27 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-07-21 16:13:27 +0000
commit88ba32a0f9fbca4cc01eceb41c671a76375f4595 (patch)
treeea200105fe6526245899eeb5db82b23816e645fc /bfd/elflink.c
parent37c43c558fad7c90c5b7c4bf686ec599a8e793e0 (diff)
downloadfsf-binutils-gdb-88ba32a0f9fbca4cc01eceb41c671a76375f4595.zip
fsf-binutils-gdb-88ba32a0f9fbca4cc01eceb41c671a76375f4595.tar.gz
fsf-binutils-gdb-88ba32a0f9fbca4cc01eceb41c671a76375f4595.tar.bz2
2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
PR ld/4424 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible to check if 2 inputs are compatible.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index de1939a..69a7c69 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -881,9 +881,11 @@ _bfd_elf_merge_symbol (bfd *abfd,
return FALSE;
*sym_hash = h;
+ bed = get_elf_backend_data (abfd);
+
/* This code is for coping with dynamic objects, and is only useful
if we are doing an ELF link. */
- if (info->output_bfd->xvec != abfd->xvec)
+ if (!(*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec))
return TRUE;
/* For merging, we only care about real symbols. */
@@ -970,7 +972,6 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_common);
- bed = get_elf_backend_data (abfd);
/* When we try to create a default indirect symbol from the dynamic
definition with the default version, we skip it if its type and
the type of existing regular definition mismatch. We only do it