binutils 2.15, it introduces bogus failures when inter-library dependencies
are present.
With the binutils 2.17 behaviour restored, --as-needed will cause linker
failures when necessary inter-library dependencies are not present. This is
actually a good thing as binutils 2.15 will silently produce executables
that will fail at runtime in those cases.
ok miod@
bfd_boolean add_needed;
struct elf_link_hash_table *htab;
bfd_size_type amt;
-#if 0
void *alloc_mark = NULL;
-#endif
void *old_tab = NULL;
-#if 0
void *old_hash;
void *old_ent;
struct bfd_link_hash_entry *old_undefs = NULL;
long old_dynsymcount = 0;
size_t tabsize = 0;
size_t hashsize = 0;
-#endif
htab = elf_hash_table (info);
bed = get_elf_backend_data (abfd);
}
}
-#if 0
/* If we are loading an as-needed shared lib, save the symbol table
state before we start adding symbols. If the lib turns out
to be unneeded, restore the state. */
}
}
}
-#endif
weaks = NULL;
ever = extversym != NULL ? extversym + extsymoff : NULL;
isymbuf = NULL;
}
-#if 0
if ((elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0)
{
unsigned int i;
free (nondeflt_vers);
return TRUE;
}
-#endif
if (old_tab != NULL)
{