diff options
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 727be33..b4b9f29 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -675,7 +675,7 @@ _bfd_generic_link_hash_table_create (abfd) struct generic_link_hash_table *ret; bfd_size_type amt = sizeof (struct generic_link_hash_table); - ret = (struct generic_link_hash_table *) bfd_alloc (abfd, amt); + ret = (struct generic_link_hash_table *) bfd_malloc (amt); if (ret == NULL) return (struct bfd_link_hash_table *) NULL; if (! _bfd_link_hash_table_init (&ret->root, abfd, @@ -687,6 +687,17 @@ _bfd_generic_link_hash_table_create (abfd) return &ret->root; } +void +_bfd_generic_link_hash_table_free (hash) + struct bfd_link_hash_table *hash; +{ + struct generic_link_hash_table *ret + = (struct generic_link_hash_table *) hash; + + bfd_hash_table_free (&ret->root.table); + free (ret); +} + /* Grab the symbols for an object file when doing a generic link. We store the symbols in the outsymbols field. We need to keep them around for the entire link to ensure that we only read them once. @@ -1419,7 +1430,7 @@ static const enum link_action link_action[8][8] = /* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE }, /* COMMON_ROW */ {COM, COM, COM, CREF, COM, BIG, REFC, WARNC }, /* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE }, - /* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, MWARN }, + /* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, NOACT }, /* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE } }; @@ -2456,6 +2467,9 @@ _bfd_generic_link_write_global_symbol (h, data) (struct generic_write_global_symbol_info *) data; asymbol *sym; + if (h->root.type == bfd_link_hash_warning) + h = (struct generic_link_hash_entry *) h->root.u.i.link; + if (h->written) return true; |