aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-07-11 21:22:17 +0000
committerIan Lance Taylor <ian@airs.com>1995-07-11 21:22:17 +0000
commit6c481b58a6d669a73761749d008e9c235112a1a1 (patch)
tree4cbec20c561cdea2c55b6cfbeaef9c28fa19cbaf /bfd
parent0e75a8d6daf44ac18c8e5f695598b5292ee8c4b8 (diff)
downloadgdb-6c481b58a6d669a73761749d008e9c235112a1a1.zip
gdb-6c481b58a6d669a73761749d008e9c235112a1a1.tar.gz
gdb-6c481b58a6d669a73761749d008e9c235112a1a1.tar.bz2
* aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
that archives hold a.out objects. * cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define. (lynx_link_add_symbols): Remove. * cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define. (lynx_link_add_symbols): Remove. * elflink.h (elf_bfd_link_add_symbols): Don't bother to check that archives hold ELF objects.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/cf-m68klynx.c33
-rw-r--r--bfd/elflink.h18
3 files changed, 9 insertions, 51 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 846fd31..cd2aab7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,14 @@
Tue Jul 11 15:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
+ * aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
+ that archives hold a.out objects.
+ * cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define.
+ (lynx_link_add_symbols): Remove.
+ * cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define.
+ (lynx_link_add_symbols): Remove.
+ * elflink.h (elf_bfd_link_add_symbols): Don't bother to check that
+ archives hold ELF objects.
+
* archive.c (bfd_generic_archive_p): If the archive has a map, and
the target was defaulted, but the first object in the archive can
not be matched with that target, then return a bad format error.
diff --git a/bfd/cf-m68klynx.c b/bfd/cf-m68klynx.c
index 94a6fb0..8149dc6 100644
--- a/bfd/cf-m68klynx.c
+++ b/bfd/cf-m68klynx.c
@@ -43,7 +43,6 @@ struct internal_syment;
static bfd_reloc_status_type _bfd_m68klynx_special_fn
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-static boolean lynx_link_add_symbols PARAMS ((bfd *, struct bfd_link_info *));
static reloc_howto_type *coff_m68k_lynx_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *,
struct coff_link_hash_entry *, struct internal_syment *,
@@ -176,42 +175,10 @@ _bfd_m68klynx_special_fn (abfd, reloc_entry, symbol, data, input_section,
cache_ptr->addend += asect->vma; \
}
-#define coff_bfd_link_add_symbols lynx_link_add_symbols
#define coff_rtype_to_howto coff_m68k_lynx_rtype_to_howto
#include "coff-m68k.c"
-/* On Lynx, we may have a COFF archive which contains a.out elements.
- This screws up the COFF linker, which expects that any archive it
- gets contains COFF elements. We override the add_symbols function
- to check for this case. */
-
-static boolean
-lynx_link_add_symbols (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info;
-{
- if (bfd_get_format (abfd) == bfd_archive)
- {
- bfd *first;
-
- first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
- if (first == NULL)
- return false;
- if (! bfd_check_format (first, bfd_object))
- return false;
- if (bfd_get_flavour (first) != bfd_target_coff_flavour)
- {
- /* Treat the archive as though it were actually of the
- flavour of its first element. This ought to work,
- since the archive support is fairly generic. */
- return (*first->xvec->_bfd_link_add_symbols) (abfd, info);
- }
- }
-
- return _bfd_coff_link_add_symbols (abfd, info);
-}
-
/* coff-m68k.c uses the special COFF backend linker. We need to
adjust common symbols.
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 3e7ef78..6cfdff4 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -46,29 +46,11 @@ elf_bfd_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
{
- bfd *first;
-
switch (bfd_get_format (abfd))
{
case bfd_object:
return elf_link_add_object_symbols (abfd, info);
case bfd_archive:
- first = bfd_openr_next_archived_file (abfd, (bfd *) NULL);
- if (first == NULL)
- {
- /* It's OK to have an empty archive. */
- return true;
- }
- if (! bfd_check_format (first, bfd_object))
- return false;
- if (bfd_get_flavour (first) != bfd_target_elf_flavour)
- {
- /* On Linux, we may have an a.out archive which got
- recognized as an ELF archive. Therefore, we treat all
- archives as though they were actually of the flavour of
- their first element. */
- return (*first->xvec->_bfd_link_add_symbols) (abfd, info);
- }
return elf_link_add_archive_symbols (abfd, info);
default:
bfd_set_error (bfd_error_wrong_format);