/* COFF specific linker code.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
struct coff_link_hash_table *ret;
bfd_size_type amt = sizeof (struct coff_link_hash_table);
- ret = (struct coff_link_hash_table *) bfd_alloc (abfd, amt);
+ ret = (struct coff_link_hash_table *) bfd_malloc (amt);
if (ret == NULL)
return NULL;
if (! _bfd_coff_link_hash_table_init (ret, abfd,
_bfd_coff_link_hash_newfunc))
{
- bfd_release (abfd, ret);
+ free (ret);
return (struct bfd_link_hash_table *) NULL;
}
return &ret->root;
if (info->task_link)
{
finfo.failed = false;
- coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals,
+ coff_link_hash_traverse (coff_hash_table (info),
+ _bfd_coff_write_task_globals,
(PTR) &finfo);
if (finfo.failed)
goto error_return;
/* Write out the global symbols. */
finfo.failed = false;
- coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_global_sym,
+ coff_link_hash_traverse (coff_hash_table (info),
+ _bfd_coff_write_global_sym,
(PTR) &finfo);
if (finfo.failed)
goto error_return;
output_bfd = finfo->output_bfd;
+ if (h->root.type == bfd_link_hash_warning)
+ {
+ h = (struct coff_link_hash_entry *) h->root.u.i.link;
+ if (h->root.type == bfd_link_hash_new)
+ return true;
+ }
+
if (h->indx >= 0)
return true;
{
default:
case bfd_link_hash_new:
+ case bfd_link_hash_warning:
abort ();
return false;
break;
case bfd_link_hash_indirect:
- case bfd_link_hash_warning:
/* Just ignore these. They can't be handled anyhow. */
return true;
}
boolean rtnval = true;
boolean save_global_to_static;
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct coff_link_hash_entry *) h->root.u.i.link;
+
if (h->indx < 0)
{
switch (h->root.type)