summaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-06-28 13:57:59 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-06-28 13:57:59 +0000
commitd9a00d82ea2acce30653b3258d20a98fa9f83ff4 (patch)
tree82c78594fe934dad0fe26b6d919d2d764e7a26b1 /bfd/cofflink.c
parent6b8a426ec384f901559be18bb874d86192d6dbe0 (diff)
downloadbinutils-redhat-d9a00d82ea2acce30653b3258d20a98fa9f83ff4.tar.gz
* bfd-in.h (struct stab_info): Move from stabs.c.
* stabs.c (struct stab_link_includes_table): Delete. (stab_link_includes_lookup): Delete. (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one level of indirection from sinfo parm. (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on stabstr section. Adjust hash table accesses. * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents alloc. Adjust stab_info test. * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info. (_bfd_coff_final_link): Adjust stab_info test. (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections. * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info in place. * libcoff-in.h (struct coff_link_hash_table): Likewise. * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info. * elflink.c (bfd_elf_final_link): Don't attempt to link linker created stabstr section. Adjust stab_info test. * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs) (_bfd_write_stab_strings): Adjust prototypes. * libbfd.h: Regenerate. * libcoff.h: Regenerate. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index f9e89180ae..1af86abaec 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -96,7 +96,7 @@ _bfd_coff_link_hash_table_init (struct coff_link_hash_table *table,
struct bfd_hash_table *,
const char *))
{
- table->stab_info = NULL;
+ memset (&table->stab_info, 0, sizeof (table->stab_info));
return _bfd_link_hash_table_init (&table->root, abfd, newfunc);
}
@@ -1082,7 +1082,7 @@ _bfd_coff_final_link (bfd *abfd,
}
/* If we have optimized stabs strings, output them. */
- if (coff_hash_table (info)->stab_info != NULL)
+ if (coff_hash_table (info)->stab_info.stabstr != NULL)
{
if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info))
return FALSE;
@@ -2282,6 +2282,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
/* This section was omitted from the link. */
continue;
+ if ((o->flags & SEC_LINKER_CREATED) != 0)
+ continue;
+
if ((o->flags & SEC_HAS_CONTENTS) == 0
|| (o->size == 0 && (o->flags & SEC_RELOC) == 0))
{