2008-07-21 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Jul 2008 16:13:27 +0000 (16:13 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 21 Jul 2008 16:13:27 +0000 (16:13 +0000)
PR ld/4424
* elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
to check if 2 inputs are compatible.

bfd/ChangeLog
bfd/elflink.c

index dfbd19ffecd88efc3fbd128b45e67937e225f9c2..b5967c95e5ddad126f966ce1b5374ae3c53b69fe 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2008-07-21  Sterling Augustine  <sterling@tensilica.com>
 
        * elf.c (assign_file_positions_for_load_sections): Print vma in
index de1939ac7c8b2a6aa7c1291023becfcce3d96827..69a7c6945ce31376bb2d1a5f10233037a62d34a1 100644 (file)
@@ -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