* alpha-tdep.c (alpha_push_dummy_call): Handle COMPLEX types.
[binutils-gdb.git] / bfd / elflink.h
index 2c025edceee6d895788ec70d52d3b17f28de06d1..e7019f3761ea9427e7229e7f242cf82618475c3f 100644 (file)
@@ -474,7 +474,7 @@ elf_link_add_object_symbols (abfd, info)
      .gnu.warning.SYMBOL are treated as warning symbols for the given
      symbol.  This differs from .gnu.warning sections, which generate
      warnings when they are included in an output file.  */
-  if (! info->shared)
+  if (info->executable)
     {
       asection *s;
 
@@ -1321,7 +1321,7 @@ elf_link_add_object_symbols (abfd, info)
                }
              else
                new_flag = ELF_LINK_HASH_DEF_REGULAR;
-             if (info->shared
+             if (! info->executable
                  || (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
                                   | ELF_LINK_HASH_REF_DYNAMIC)) != 0)
                dynsym = TRUE;
@@ -2174,7 +2174,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
       if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL)
        {
          /* DT_PREINIT_ARRAY is not allowed in shared library.  */
-         if (info->shared)
+         if (! info->executable)
            {
              bfd *sub;
              asection *o;
@@ -2440,7 +2440,7 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
       if (info->flags_1)
        {
-         if (! info->shared)
+         if (info->executable)
            info->flags_1 &= ~ (DF_1_INITFIRST
                                | DF_1_NODELETE
                                | DF_1_NOOPEN);
@@ -4334,6 +4334,7 @@ elf_link_check_versioned_symbol (info, h)
        {
          const char *name;
          Elf_Internal_Versym iver;
+         unsigned short version_index;
 
          if (ELF_ST_BIND (isym->st_info) == STB_LOCAL
              || isym->st_shndx == SHN_UNDEF)
@@ -4354,9 +4355,10 @@ elf_link_check_versioned_symbol (info, h)
              abort ();
            }
 
-         if ((iver.vs_vers & VERSYM_VERSION) == 2)
+         version_index = iver.vs_vers & VERSYM_VERSION;
+         if (version_index == 1 || version_index == 2)
            {
-             /* This is the oldest (default) sym.  We can use it.  */
+             /* This is the base or first version.  We can use it.  */
              free (extversym);
              free (isymbuf);
              return TRUE;
@@ -4415,7 +4417,8 @@ elf_link_output_extsym (h, data)
      referenced by regular files, because we will already have issued
      warnings for them.  */
   if (! finfo->info->relocateable
-      && (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
+      && (finfo->info->executable
+         || ! finfo->info->allow_shlib_undefined)
       && h->root.type == bfd_link_hash_undefined
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
       && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
@@ -4618,9 +4621,9 @@ elf_link_output_extsym (h, data)
   /* If a non-weak symbol with non-default visibility is not defined
      locally, it is a fatal error.  */
   if (! finfo->info->relocateable
-      && ELF_ST_VISIBILITY (sym.st_other)
+      && ELF_ST_VISIBILITY (sym.st_other) != STV_DEFAULT
       && ELF_ST_BIND (sym.st_info) != STB_WEAK
-      && h->root.type != bfd_link_hash_undefweak
+      && h->root.type == bfd_link_hash_undefined
       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
     {
       (*_bfd_error_handler)