aboutsummaryrefslogtreecommitdiff
path: root/bfd/archive.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-12-10 01:41:22 +0000
committerNick Clifton <nickc@redhat.com>1999-12-10 01:41:22 +0000
commitad247e3c7de719151c02516afc9c682a32a181cc (patch)
tree9bbb9e72bbacd188c81701ec1148e0e45e5bf187 /bfd/archive.c
parentc7d85a8d921dafd1c9eb0f132977427d3d107226 (diff)
downloadgdb-ad247e3c7de719151c02516afc9c682a32a181cc.zip
gdb-ad247e3c7de719151c02516afc9c682a32a181cc.tar.gz
gdb-ad247e3c7de719151c02516afc9c682a32a181cc.tar.bz2
Change AR for ELF so that common symbols are not included in archive map.
Change LD for ELF so that archive elements whoes archive map contains a reference to a common symbol will get linkled in. Add new field to bfd_target structure and initialise it for all bfd targets.
Diffstat (limited to 'bfd/archive.c')
-rw-r--r--bfd/archive.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/bfd/archive.c b/bfd/archive.c
index 19293af..3390a1c 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1804,16 +1804,19 @@ _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 ((flags & BSF_GLOBAL ||
- flags & BSF_WEAK ||
- flags & BSF_INDIRECT ||
- bfd_is_com_section (sec))
- && ! bfd_is_und_section (sec))
+ if (bfd_is_und_section (sec))
+ continue;
+ else if (bfd_is_com_section (sec))
{
- size_t namelen;
- struct orl *new_map;
-
+ if (! bfd_allow_commons_in_armap (arch))
+ continue;
+ }
+ else if ((flags & (BSF_GLOBAL | BSF_WEAK | BSF_INDIRECT)) == 0)
+ continue;
+
/* This symbol will go into the archive header */
if (orl_count == orl_max)
{
@@ -1842,7 +1845,6 @@ _bfd_compute_and_write_armap (arch, elength)
stridx += namelen + 1;
++orl_count;
- }
}
}