aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog20
-rw-r--r--bfd/aout-target.h3
-rw-r--r--bfd/aout-tic30.c3
-rw-r--r--bfd/archive.c20
-rw-r--r--bfd/bfd-in2.h11
-rw-r--r--bfd/bfd.c3
-rw-r--r--bfd/coff-alpha.c2
-rw-r--r--bfd/coff-rs6000.c1
-rw-r--r--bfd/elf64-mips.c1
-rw-r--r--bfd/elflink.h21
-rw-r--r--bfd/elfxx-target.h9
-rw-r--r--bfd/ieee.c1
-rw-r--r--bfd/libbfd-in.h3
-rw-r--r--bfd/libbfd.h3
-rw-r--r--bfd/libecoff.h1
-rw-r--r--bfd/oasys.c1
-rw-r--r--bfd/som.c1
-rw-r--r--bfd/targets.c6
-rw-r--r--bfd/vms.c1
19 files changed, 35 insertions, 76 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c4c6aa8..e351bfb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,23 @@
+1999-12-10 Nick Clifton <nickc@cygnus.com>
+
+ * elflink.h: Revert previous patch.
+ * targets.c: Revert previous patch.
+ * libbfd-in2.h: Revert previous patch.
+ * libbfd.h: Revert previous patch.
+ * elfxx-target.h: Revert previous patch.
+ * archive.c: Revert previous patch.
+ * aout-target.h: Revert previous patch.
+ * aout-tic30.h: Revert previous patch.
+ * bfd.c: Revert previous patch.
+ * coff-alpha.c: Revert previous patch.
+ * coff-rs6000.c: Revert previous patch.
+ * elf64-mips.c: Revert previous patch.
+ * ieee.c: Revert previous patch.
+ * libecoff.h: Revert previous patch.
+ * oasys.c: Revert previous patch.
+ * som.c: Revert previous patch.
+ * vms.c: Revert previous patch.
+
1999-12-09 Nick Clifton <nickc@cygnus.com>
* elflink.h (elf_link_add_archive_symbols): Add an archive
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index 0650c4c..5ca50ac 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -421,9 +421,6 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_update_armap_timestamp
#define MY_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
#endif
-#ifndef MY_allow_commons_in_armap
-#define MY_allow_commons_in_armap _bfd_archive_bsd_allow_commons_in_armap
-#endif
/* No core file defined here -- configure in trad-core.c separately. */
#ifndef MY_core_file_failing_command
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index f39e5c3..0dcae0c 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -851,9 +851,6 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_update_armap_timestamp
#define MY_update_armap_timestamp _bfd_archive_bsd_update_armap_timestamp
#endif
-#ifndef MY_allow_commons_in_armap
-#define MY_allow_commons_in_armap _bfd_archive_bsd_allow_commons_in_armap
-#endif
/* No core file defined here -- configure in trad-core.c separately. */
#ifndef MY_core_file_failing_command
diff --git a/bfd/archive.c b/bfd/archive.c
index 3390a1c..19293af 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1804,19 +1804,16 @@ _bfd_compute_and_write_armap (arch, elength)
{
flagword flags = (syms[src_count])->flags;
asection *sec = syms[src_count]->section;
- size_t namelen;
- struct orl *new_map;
- if (bfd_is_und_section (sec))
- continue;
- else if (bfd_is_com_section (sec))
+ if ((flags & BSF_GLOBAL ||
+ flags & BSF_WEAK ||
+ flags & BSF_INDIRECT ||
+ bfd_is_com_section (sec))
+ && ! bfd_is_und_section (sec))
{
- if (! bfd_allow_commons_in_armap (arch))
- continue;
- }
- else if ((flags & (BSF_GLOBAL | BSF_WEAK | BSF_INDIRECT)) == 0)
- continue;
-
+ size_t namelen;
+ struct orl *new_map;
+
/* This symbol will go into the archive header */
if (orl_count == orl_max)
{
@@ -1845,6 +1842,7 @@ _bfd_compute_and_write_armap (arch, elength)
stridx += namelen + 1;
++orl_count;
+ }
}
}
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8a6cbd3..93c9b7e 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -2713,9 +2713,6 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_update_armap_timestamp(abfd) \
BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-#define bfd_allow_commons_in_armap(abfd) \
- BFD_SEND (abfd, _bfd_allow_commons_in_armap, (abfd))
-
#define bfd_set_arch_mach(abfd, arch, mach)\
BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
@@ -2923,8 +2920,7 @@ CAT(NAME,_read_ar_hdr),\
CAT(NAME,_openr_next_archived_file),\
CAT(NAME,_get_elt_at_index),\
CAT(NAME,_generic_stat_arch_elt),\
-CAT(NAME,_update_armap_timestamp), \
-CAT(NAME,_allow_commons_in_armap)
+CAT(NAME,_update_armap_timestamp)
boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
boolean (*_bfd_construct_extended_name_table)
@@ -2935,14 +2931,13 @@ CAT(NAME,_allow_commons_in_armap)
struct orl *map,
unsigned int orl_count,
int stridx));
- PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+ PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
- boolean (*_bfd_allow_commons_in_armap) PARAMS ((bfd *));
-
+
/* Entry points used for symbols. */
#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
CAT(NAME,_get_symtab_upper_bound),\
diff --git a/bfd/bfd.c b/bfd/bfd.c
index f804f32..e04172f 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1063,9 +1063,6 @@ DESCRIPTION
.#define bfd_update_armap_timestamp(abfd) \
. BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
.
-.#define bfd_allow_commons_in_armap(abfd) \
-. BFD_SEND (abfd, _bfd_allow_commons_in_armap, (abfd))
-.
.#define bfd_set_arch_mach(abfd, arch, mach)\
. BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
.
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 76ef5e2..bc25319 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -2036,8 +2036,6 @@ alpha_adjust_headers (abfd, fhdr, ahdr)
#define alpha_ecoff_write_armap _bfd_ecoff_write_armap
#define alpha_ecoff_generic_stat_arch_elt _bfd_ecoff_generic_stat_arch_elt
#define alpha_ecoff_update_armap_timestamp _bfd_ecoff_update_armap_timestamp
-#define alpha_ecoff_allow_commons_in_armap _bfd_true
-
/* A compressed file uses this instead of ARFMAG. */
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 0ceb7a9..6923000 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -694,7 +694,6 @@ struct xcoff_ar_hdr
/* XCOFF archives do not have a timestamp. */
#define xcoff_update_armap_timestamp bfd_true
-#define xcoff_allow_commons_in_armap bfd_true
/* Read in the armap of an XCOFF archive. */
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index cbc69b2..6fc0dcd 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2186,6 +2186,5 @@ const struct elf_size_info mips_elf64_size_info =
_bfd_archive_coff_generic_stat_arch_elt
#define bfd_elf64_archive_update_armap_timestamp \
_bfd_archive_coff_update_armap_timestamp
-#define _bfd_elf64_allow_commons_in_armap bfd_false
#include "elf64-target.h"
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 2a8c3db..ab679a7 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -200,26 +200,7 @@ elf_link_add_archive_symbols (abfd, info)
if (h == NULL)
continue;
- /* We have changed the GNU archiver so that it will only place
- non-common symbols into its archive map. Thus if we come across
- a symbol in the archive map, which is currently considered to be
- a common symbol, we can safely assume that we should link the
- element in, in order to get in the definition of the symbol.
-
- Previous versions of the archiver would place common symbols into
- the archive map. This meant that in order to only link in an
- element if it contained a *definition* of a common symbol, it
- would be necessary to read in the element and scan its symbol
- table - a slow and wasteful process.
-
- In fact previous versions of this code did not even do that,
- instead it just unilaterally ignored any symbols in the archive
- map which were currently marked as common. So in order to link
- in an archive element containing the definition of a common
- symbol it was necessary to have that element also contain the
- defintion of a currently undefined symbol. */
- if (h->root.type != bfd_link_hash_undefined
- && h->root.type != bfd_link_hash_common)
+ if (h->root.type != bfd_link_hash_undefined)
{
if (h->root.type != bfd_link_hash_undefweak)
defined[i] = true;
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 6963d4e..0a69dd8 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -485,13 +485,6 @@ const bfd_target TARGET_BIG_SYM =
#ifdef bfd_elfNN_archive_functions
BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
#else
- /* For ELF based targets we do not want to put common symbols into the
- archive map. This is a change from the old behaviour, and it is
- being done because of a corresponding change in the linker, whereby
- it will link in any archive element that contains a symbol which is
- currently common. (See elflink.h:elf_link_add_archive_symbol). */
-#undef _bfd_archive_coff_allow_commons_in_armap
-#define _bfd_archive_coff_allow_commons_in_armap bfd_false
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
#endif
BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
@@ -587,8 +580,6 @@ const bfd_target TARGET_LITTLE_SYM =
#ifdef bfd_elfNN_archive_functions
BFD_JUMP_TABLE_ARCHIVE (bfd_elfNN_archive),
#else
-#undef _bfd_archive_coff_allow_commons_in_armap
-#define _bfd_archive_coff_allow_commons_in_armap bfd_false
BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
#endif
BFD_JUMP_TABLE_SYMBOLS (bfd_elfNN),
diff --git a/bfd/ieee.c b/bfd/ieee.c
index f9c9a28..989d724 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -3900,7 +3900,6 @@ ieee_bfd_debug_info_accumulate (abfd, section)
bfd_true)
#define ieee_read_ar_hdr bfd_nullvoidptr
#define ieee_update_armap_timestamp bfd_true
-#define ieee_allow_commons_in_armap bfd_true
#define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
#define ieee_bfd_is_local_label_name bfd_generic_is_local_label_name
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 3ea4e8a..79a176d 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -211,7 +211,6 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
((bfd *(*) PARAMS ((bfd *, symindex))) bfd_nullvoidptr)
#define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define _bfd_noarchive_update_armap_timestamp bfd_false
-#define _bfd_noarchive_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */
@@ -230,7 +229,6 @@ extern boolean _bfd_archive_bsd_construct_extended_name_table
#define _bfd_archive_bsd_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
extern boolean _bfd_archive_bsd_update_armap_timestamp PARAMS ((bfd *));
-#define _bfd_archive_bsd_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff). */
@@ -249,7 +247,6 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_archive_coff_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
#define _bfd_archive_coff_update_armap_timestamp bfd_true
-#define _bfd_archive_coff_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 6063dd5..26bf7ef 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -211,7 +211,6 @@ extern boolean _bfd_nocore_core_file_matches_executable_p
((bfd *(*) PARAMS ((bfd *, symindex))) bfd_nullvoidptr)
#define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define _bfd_noarchive_update_armap_timestamp bfd_false
-#define _bfd_noarchive_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */
@@ -230,7 +229,6 @@ extern boolean _bfd_archive_bsd_construct_extended_name_table
#define _bfd_archive_bsd_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
extern boolean _bfd_archive_bsd_update_armap_timestamp PARAMS ((bfd *));
-#define _bfd_archive_bsd_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff). */
@@ -249,7 +247,6 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_archive_coff_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
#define _bfd_archive_coff_update_armap_timestamp bfd_true
-#define _bfd_archive_coff_allow_commons_in_armap bfd_true
/* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
diff --git a/bfd/libecoff.h b/bfd/libecoff.h
index cd5dc49..4561805 100644
--- a/bfd/libecoff.h
+++ b/bfd/libecoff.h
@@ -295,7 +295,6 @@ extern boolean _bfd_ecoff_write_armap
#define _bfd_ecoff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_ecoff_generic_stat_arch_elt bfd_generic_stat_arch_elt
#define _bfd_ecoff_update_armap_timestamp bfd_true
-#define _bfd_ecoff_allow_commons_in_armap bfd_true
extern long _bfd_ecoff_get_symtab_upper_bound PARAMS ((bfd *abfd));
extern long _bfd_ecoff_get_symtab PARAMS ((bfd *abfd, asymbol **alocation));
diff --git a/bfd/oasys.c b/bfd/oasys.c
index c654b56..e69053b 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -1458,7 +1458,6 @@ oasys_sizeof_headers (abfd, exec)
#define oasys_read_ar_hdr bfd_nullvoidptr
#define oasys_get_elt_at_index _bfd_generic_get_elt_at_index
#define oasys_update_armap_timestamp bfd_true
-#define oasys_allow_commons_in_armap bfd_true
#define oasys_bfd_is_local_label_name bfd_generic_is_local_label_name
#define oasys_get_lineno _bfd_nosymbols_get_lineno
diff --git a/bfd/som.c b/bfd/som.c
index ef7de6d..6f2b6c3 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6229,7 +6229,6 @@ som_bfd_link_split_section (abfd, sec)
#define som_construct_extended_name_table \
_bfd_archive_coff_construct_extended_name_table
#define som_update_armap_timestamp bfd_true
-#define som_allow_commons_in_armap bfd_true
#define som_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
#define som_get_lineno _bfd_nosymbols_get_lineno
diff --git a/bfd/targets.c b/bfd/targets.c
index e621856..a50cc59 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -318,8 +318,7 @@ BFD_JUMP_TABLE macros.
.CAT(NAME,_openr_next_archived_file),\
.CAT(NAME,_get_elt_at_index),\
.CAT(NAME,_generic_stat_arch_elt),\
-.CAT(NAME,_update_armap_timestamp), \
-.CAT(NAME,_allow_commons_in_armap)
+.CAT(NAME,_update_armap_timestamp)
. boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
. boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
. boolean (*_bfd_construct_extended_name_table)
@@ -330,13 +329,12 @@ BFD_JUMP_TABLE macros.
. struct orl *map,
. unsigned int orl_count,
. int stridx));
-. PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+. PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
. bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
.#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
. bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
. int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
. boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
-. boolean (*_bfd_allow_commons_in_armap) PARAMS ((bfd *));
.
. {* Entry points used for symbols. *}
.#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
diff --git a/bfd/vms.c b/bfd/vms.c
index 9f85249..f0ea63f 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -127,7 +127,6 @@ static boolean vms_bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
static boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define vms_make_empty_symbol _bfd_vms_make_empty_symbol
-#define vms_allow_commons_in_armap bfd_true
/*===========================================================================*/