Check incompatible existing default symbol definition
[deliverable/binutils-gdb.git] / bfd / elflink.c
index d0006da5d5894c3306ca8b5207fdacf6002df402..792e14e526fd6821805ed1a53d3bbb3532894fda 100644 (file)
@@ -1092,11 +1092,14 @@ _bfd_elf_merge_symbol (bfd *abfd,
       && newdyn
       && newdef
       && !olddyn
-      && (olddef || h->root.type == bfd_link_hash_common)
-      && ELF_ST_TYPE (sym->st_info) != h->type
-      && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
-      && h->type != STT_NOTYPE
-      && !(newfunc && oldfunc))
+      && (((olddef || h->root.type == bfd_link_hash_common)
+          && ELF_ST_TYPE (sym->st_info) != h->type
+          && ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
+          && h->type != STT_NOTYPE
+          && !(newfunc && oldfunc))
+         || (olddef
+             && ((h->type == STT_GNU_IFUNC)
+                 != (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)))))
     {
       *skip = TRUE;
       return TRUE;
This page took 0.039317 seconds and 4 git commands to generate.