diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-05-12 21:05:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-05-12 21:05:43 +0000 |
commit | a01f19e2929464e6a8d0b485dd0f029660b0bef6 (patch) | |
tree | 358d46440f3d3183335ed8ddf27663bc62487949 | |
parent | 6b60fe2b567f3d675930858b290406b83693e4a2 (diff) |
Revert rev 1.3. While that change appears to make the behaviour similar to
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@
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elflink.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elflink.c b/gnu/usr.bin/binutils-2.17/bfd/elflink.c index 6bb64fbc5a5..b572921706f 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elflink.c +++ b/gnu/usr.bin/binutils-2.17/bfd/elflink.c @@ -3079,11 +3079,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) 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; @@ -3091,7 +3088,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) long old_dynsymcount = 0; size_t tabsize = 0; size_t hashsize = 0; -#endif htab = elf_hash_table (info); bed = get_elf_backend_data (abfd); @@ -3466,7 +3462,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } } -#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. */ @@ -3529,7 +3524,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } } } -#endif weaks = NULL; ever = extversym != NULL ? extversym + extsymoff : NULL; @@ -4139,7 +4133,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) isymbuf = NULL; } -#if 0 if ((elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0) { unsigned int i; @@ -4183,7 +4176,6 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) free (nondeflt_vers); return TRUE; } -#endif if (old_tab != NULL) { |