diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-10-07 08:53:42 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2003-10-07 08:53:42 +0000 |
commit | 29ca8dc5bbf7312b8f264e5ad5efee8db6a7d95a (patch) | |
tree | e5cba2ea74dcb45d1da4e85db7282c1bff99797f /bfd/cofflink.c | |
parent | cd339148dea20e4fffc4a184329a978c7894a9e5 (diff) | |
download | gdb-29ca8dc5bbf7312b8f264e5ad5efee8db6a7d95a.zip gdb-29ca8dc5bbf7312b8f264e5ad5efee8db6a7d95a.tar.gz gdb-29ca8dc5bbf7312b8f264e5ad5efee8db6a7d95a.tar.bz2 |
bfd/Changelog:
* libbfd-in.h (_bfd_link_section_stabs): Add string offset
parameter.
* cofflink.c (coff_link_add_symbols): Deal with split stab
sections.
* elflink.h (elf_link_add_object_symbols): Deal with split stab
sections.
* stabs.c (_bfd_link_section_stabs): Add string offset parameter.
* libbfd.h: Regenerated.
ld/ChangeLog:
* ldwrite.c (unsplittable_name): New.
(clone_section): Strip existing numeric suffix. Only truncate names
for coff targets.
(split_sections): Use unsplittable_name.
binutils/ChangeLog:
* objdump.c (read_section_stabs): Just read one section, return
pointer to it. Add size parameter.
(print_section_stabs): Add string offset parameter. Adjust.
(struct stab_section_names): Add string offset member.
(find_stabs_sections): Correct check for split section suffix,
adjust read_section_stabs and print_section_stabs calls.
(dump_stabs_section): Clear string_offset, free string table.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r-- | bfd/cofflink.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 1b059f6..dbe7fbf 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -570,19 +570,24 @@ coff_link_add_symbols (bfd *abfd, && info->hash->creator->flavour == bfd_get_flavour (abfd) && (info->strip != strip_all && info->strip != strip_debugger)) { - asection *stab, *stabstr; + asection *stabstr; - stab = bfd_get_section_by_name (abfd, ".stab"); - if (stab != NULL) - { - stabstr = bfd_get_section_by_name (abfd, ".stabstr"); + stabstr = bfd_get_section_by_name (abfd, ".stabstr"); - if (stabstr != NULL) + if (stabstr != NULL) + { + bfd_size_type string_offset = 0; + asection *stab; + + for (stab = abfd->sections; stab; stab = stab->next) + if (strncmp (".stab", stab->name, 5) == 0 + && (!stab->name[5] + || (stab->name[5] == '.' && isdigit (stab->name[6])))) { struct coff_link_hash_table *table; - struct coff_section_tdata *secdata; - - secdata = coff_section_data (abfd, stab); + struct coff_section_tdata *secdata + = coff_section_data (abfd, stab); + if (secdata == NULL) { amt = sizeof (struct coff_section_tdata); @@ -596,7 +601,8 @@ coff_link_add_symbols (bfd *abfd, if (! _bfd_link_section_stabs (abfd, &table->stab_info, stab, stabstr, - &secdata->stab_info)) + &secdata->stab_info, + &string_offset)) goto error_return; } } |