This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix split stab section handling


Ian Lance Taylor wrote:
Nathan Sidwell <nathan@codesourcery.com> writes:

The reason a split section uses only the first five character of the
original name is that in general COFF targets have a strict limit on
the length of a section name--usually 8 characters.  And COFF targets
are the main ones which need split sections--other object file formats
generally have a sufficiently large field for the number of relocation
entries.  Using a longer name is OK if bfd_coff_long_filenames() is
ok. I couldn't figure how to make bfd_coff_long_filename visible in the
linker, without #including libcoff.h, which seemed bad. As you can see
I just predicate the truncation check on bfd_family_coff.

true for the backend, or if it is ELF.  (Is there any reason you are
using --split-* for ELF?)
Users have been customed to having --split-by-reloc in their make
files. We should either disable the option for elf, or make it work.

On a different note, I think !strncmp is a bad idiom.  It suggests the
opposite of what it means.  Use == 0 instead.
fixed,

ok?

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

bfd/Changelog:
2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>

	* 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:
2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>

	* ldwrite.c (unsplittable_name): New.
	(clone_section): Strip existing numeric suffix. Only truncate names
	for coff targets.
	(split_sections): Use unsplittable_name.

binutils/ChangeLog:
2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>

	* 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.

Index: bfd/cofflink.c
===================================================================
RCS file: /cvs/src/src/bfd/cofflink.c,v
retrieving revision 1.39
diff -c -3 -p -r1.39 cofflink.c
*** bfd/cofflink.c	3 Sep 2003 16:06:12 -0000	1.39
--- bfd/cofflink.c	19 Sep 2003 10:10:35 -0000
*************** coff_link_add_symbols (bfd *abfd,
*** 570,588 ****
        && info->hash->creator->flavour == bfd_get_flavour (abfd)
        && (info->strip != strip_all && info->strip != strip_debugger))
      {
!       asection *stab, *stabstr;
  
!       stab = bfd_get_section_by_name (abfd, ".stab");
!       if (stab != NULL)
! 	{
! 	  stabstr = bfd_get_section_by_name (abfd, ".stabstr");
  
! 	  if (stabstr != NULL)
  	    {
  	      struct coff_link_hash_table *table;
! 	      struct coff_section_tdata *secdata;
! 
! 	      secdata = coff_section_data (abfd, stab);
  	      if (secdata == NULL)
  		{
  		  amt = sizeof (struct coff_section_tdata);
--- 570,593 ----
        && info->hash->creator->flavour == bfd_get_flavour (abfd)
        && (info->strip != strip_all && info->strip != strip_debugger))
      {
!       asection *stabstr;
  
!       stabstr = bfd_get_section_by_name (abfd, ".stabstr");
  
!       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
! 		= coff_section_data (abfd, stab);
! 	      
  	      if (secdata == NULL)
  		{
  		  amt = sizeof (struct coff_section_tdata);
*************** coff_link_add_symbols (bfd *abfd,
*** 596,602 ****
  
  	      if (! _bfd_link_section_stabs (abfd, &table->stab_info,
  					     stab, stabstr,
! 					     &secdata->stab_info))
  		goto error_return;
  	    }
  	}
--- 601,608 ----
  
  	      if (! _bfd_link_section_stabs (abfd, &table->stab_info,
  					     stab, stabstr,
! 					     &secdata->stab_info,
! 					     &string_offset))
  		goto error_return;
  	    }
  	}
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.240
diff -c -3 -p -r1.240 elflink.h
*** bfd/elflink.h	23 Aug 2003 04:10:34 -0000	1.240
--- bfd/elflink.h	19 Sep 2003 10:10:47 -0000
***************
*** 20,25 ****
--- 20,27 ----
  
  /* ELF linker code.  */
  
+ #include "safe-ctype.h"
+ 
  static bfd_boolean elf_link_add_object_symbols (bfd *, struct bfd_link_info *);
  static bfd_boolean elf_link_add_archive_symbols (bfd *,
  						 struct bfd_link_info *);
*************** elf_link_add_object_symbols (bfd *abfd, 
*** 1607,1633 ****
        && is_elf_hash_table (info)
        && (info->strip != strip_all && info->strip != strip_debugger))
      {
!       asection *stab, *stabstr;
! 
!       stab = bfd_get_section_by_name (abfd, ".stab");
!       if (stab != NULL
! 	  && (stab->flags & SEC_MERGE) == 0
! 	  && !bfd_is_abs_section (stab->output_section))
! 	{
! 	  stabstr = bfd_get_section_by_name (abfd, ".stabstr");
! 
! 	  if (stabstr != NULL)
! 	    {
! 	      struct bfd_elf_section_data *secdata;
! 
! 	      secdata = elf_section_data (stab);
! 	      if (! _bfd_link_section_stabs (abfd,
! 					     & hash_table->stab_info,
! 					     stab, stabstr,
! 					     &secdata->sec_info))
! 		goto error_return;
! 	      if (secdata->sec_info)
! 		stab->sec_info_type = ELF_INFO_TYPE_STABS;
  	    }
  	}
      }
--- 1609,1640 ----
        && is_elf_hash_table (info)
        && (info->strip != strip_all && info->strip != strip_debugger))
      {
!       asection *stabstr;
!       
!       stabstr = bfd_get_section_by_name (abfd, ".stabstr");
!       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])))
! 		&& (stab->flags & SEC_MERGE) == 0
! 		&& !bfd_is_abs_section (stab->output_section))
! 	      {
! 		struct bfd_elf_section_data *secdata;
! 		
! 		secdata = elf_section_data (stab);
! 		if (! _bfd_link_section_stabs (abfd,
! 					       & hash_table->stab_info,
! 					       stab, stabstr,
! 					       &secdata->sec_info,
! 					       &string_offset))
! 		  goto error_return;
! 		if (secdata->sec_info)
! 		  stab->sec_info_type = ELF_INFO_TYPE_STABS;
  	    }
  	}
      }
Index: bfd/libbfd-in.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd-in.h,v
retrieving revision 1.26
diff -c -3 -p -r1.26 libbfd-in.h
*** bfd/libbfd-in.h	29 Jun 2003 10:06:39 -0000	1.26
--- bfd/libbfd-in.h	19 Sep 2003 10:10:49 -0000
*************** extern bfd_reloc_status_type _bfd_reloca
*** 490,496 ****
  /* Link stabs in sections in the first pass.  */
  
  extern bfd_boolean _bfd_link_section_stabs
!   (bfd *, void **, asection *, asection *, void **);
  
  /* Eliminate stabs for discarded functions and symbols.  */
  extern bfd_boolean _bfd_discard_section_stabs
--- 490,496 ----
  /* Link stabs in sections in the first pass.  */
  
  extern bfd_boolean _bfd_link_section_stabs
!   (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
  
  /* Eliminate stabs for discarded functions and symbols.  */
  extern bfd_boolean _bfd_discard_section_stabs
Index: bfd/libbfd.h
===================================================================
RCS file: /cvs/src/src/bfd/libbfd.h,v
retrieving revision 1.93
diff -c -3 -p -r1.93 libbfd.h
*** bfd/libbfd.h	4 Sep 2003 11:04:34 -0000	1.93
--- bfd/libbfd.h	19 Sep 2003 10:10:52 -0000
*************** extern bfd_reloc_status_type _bfd_reloca
*** 495,501 ****
  /* Link stabs in sections in the first pass.  */
  
  extern bfd_boolean _bfd_link_section_stabs
!   (bfd *, void **, asection *, asection *, void **);
  
  /* Eliminate stabs for discarded functions and symbols.  */
  extern bfd_boolean _bfd_discard_section_stabs
--- 495,501 ----
  /* Link stabs in sections in the first pass.  */
  
  extern bfd_boolean _bfd_link_section_stabs
!   (bfd *, void **, asection *, asection *, void **, bfd_size_type *);
  
  /* Eliminate stabs for discarded functions and symbols.  */
  extern bfd_boolean _bfd_discard_section_stabs
Index: bfd/stabs.c
===================================================================
RCS file: /cvs/src/src/bfd/stabs.c,v
retrieving revision 1.12
diff -c -3 -p -r1.12 stabs.c
*** bfd/stabs.c	30 Nov 2002 08:39:40 -0000	1.12
--- bfd/stabs.c	19 Sep 2003 10:10:55 -0000
*************** stab_link_includes_newfunc (entry, table
*** 169,180 ****
     pass of the linker.  */
  
  bfd_boolean
! _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
       bfd *abfd;
       PTR *psinfo;
       asection *stabsec;
       asection *stabstrsec;
       PTR *psecinfo;
  {
    bfd_boolean first;
    struct stab_info *sinfo;
--- 169,181 ----
     pass of the linker.  */
  
  bfd_boolean
! _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_offset)
       bfd *abfd;
       PTR *psinfo;
       asection *stabsec;
       asection *stabstrsec;
       PTR *psecinfo;
+      bfd_size_type *pstring_offset;
  {
    bfd_boolean first;
    struct stab_info *sinfo;
*************** _bfd_link_section_stabs (abfd, psinfo, s
*** 276,282 ****
       and identify N_BINCL symbols which can be eliminated.  */
  
    stroff = 0;
!   next_stroff = 0;
    skip = 0;
  
    symend = stabbuf + stabsec->_raw_size;
--- 277,287 ----
       and identify N_BINCL symbols which can be eliminated.  */
  
    stroff = 0;
!   /* The stabs sections can be split when
!      -split-by-reloc/-split-by-file is used.  We must keep track of
!      each stab section's place in the single concatenated string
!      table.  */
!   next_stroff = pstring_offset ? *pstring_offset : 0;
    skip = 0;
  
    symend = stabbuf + stabsec->_raw_size;
*************** _bfd_link_section_stabs (abfd, psinfo, s
*** 302,307 ****
--- 307,314 ----
  	     string table.  We only copy the very first one.  */
  	  stroff = next_stroff;
  	  next_stroff += bfd_get_32 (abfd, sym + 8);
+ 	  if (pstring_offset)
+ 	    *pstring_offset = next_stroff;
  	  if (! first)
  	    {
  	      *pstridx = (bfd_size_type) -1;
Index: ld/ldwrite.c
===================================================================
RCS file: /cvs/src/src/ld/ldwrite.c,v
retrieving revision 1.13
diff -c -3 -p -r1.13 ldwrite.c
*** ld/ldwrite.c	28 Jun 2003 05:28:54 -0000	1.13
--- ld/ldwrite.c	19 Sep 2003 10:10:55 -0000
*************** Foundation, Inc., 59 Temple Place - Suit
*** 23,28 ****
--- 23,29 ----
  #include "sysdep.h"
  #include "bfdlink.h"
  #include "libiberty.h"
+ #include "safe-ctype.h"
  
  #include "ld.h"
  #include "ldexp.h"
*************** build_link_order (lang_statement_union_t
*** 285,290 ****
--- 286,310 ----
      }
  }
  
+ /* Return true if NAME is the name of an unsplittable section. These
+    are the stabs strings, dwarf strings.  */
+ 
+ static bfd_boolean
+ unsplittable_name (const char *name)
+ {
+   if (strncmp (name, ".stab", 5) == 0)
+     {
+       /* There are several stab like string sections. We pattern match on
+ 	 ".stab...str"  */
+       unsigned len = strlen (name);
+       if (strcmp (&name[len-3], "str") == 0)
+ 	return TRUE;
+     }
+   else if (strcmp (name, "$GDB_STRINGS$") == 0)
+     return TRUE;
+   return FALSE;
+ }
+ 
  /* Wander around the input sections, make sure that
     we'll never try and create an output section with more relocs
     than will fit.. Do this by always assuming the worst case, and
*************** build_link_order (lang_statement_union_t
*** 293,308 ****
  static asection *
  clone_section (bfd *abfd, asection *s, const char *name, int *count)
  {
!   char templ[6];
    char *sname;
    asection *n;
    struct bfd_link_hash_entry *h;
  
!   /* Invent a section name from the first five chars of the base
!      section name and a digit suffix.  */
!   strncpy (templ, name, sizeof (templ) - 1);
!   templ[sizeof (templ) - 1] = '\0';
!   if ((sname = bfd_get_unique_section_name (abfd, templ, count)) == NULL
        || (n = bfd_make_section_anyway (abfd, sname)) == NULL
        || (h = bfd_link_hash_lookup (link_info.hash,
  				    sname, TRUE, TRUE, FALSE)) == NULL)
--- 313,353 ----
  static asection *
  clone_section (bfd *abfd, asection *s, const char *name, int *count)
  {
!   char *tname;
    char *sname;
+   unsigned int len;	
    asection *n;
    struct bfd_link_hash_entry *h;
  
!   /* Invent a section name from the section name and a dotted numeric
!      suffix.   */
!   len = strlen (name);
!   tname = xmalloc (len + 1);
!   memcpy (tname, name, len + 1);
!   /* Remove a dotted number suffix, from a previous split link. */
!   while (len && ISDIGIT (tname[len-1]))
!     len--;
!   if (len > 1 && tname[len-1] == '.')
!     /* It was a dotted number. */
!     tname[len-1] = 0;
! 
!   /* We want to use the whole of the original section name for the
!      split name, but coff can be restricted to 8 character names.  */
!   if (bfd_family_coff (abfd) && strlen (tname) > 5)
!     {
!       /* Some section names cannot be truncated, as the name is
! 	 used to locate some other section.  */
!       if (strncmp (name, ".stab", 5) == 0
! 	  || strcmp (name, "$GDB_SYMBOLS$") == 0)
! 	{
! 	  einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
! 	  /* Silence gcc warnings.  einfo exits, so we never reach here.  */
! 	  return NULL;
! 	}
!       tname[5] = 0;
!     }
!   
!   if ((sname = bfd_get_unique_section_name (abfd, tname, count)) == NULL
        || (n = bfd_make_section_anyway (abfd, sname)) == NULL
        || (h = bfd_link_hash_lookup (link_info.hash,
  				    sname, TRUE, TRUE, FALSE)) == NULL)
*************** clone_section (bfd *abfd, asection *s, c
*** 311,317 ****
        /* Silence gcc warnings.  einfo exits, so we never reach here.  */
        return NULL;
      }
! 
    /* Set up section symbol.  */
    h->type = bfd_link_hash_defined;
    h->u.def.value = 0;
--- 356,363 ----
        /* Silence gcc warnings.  einfo exits, so we never reach here.  */
        return NULL;
      }
!   free (tname);
!   
    /* Set up section symbol.  */
    h->type = bfd_link_hash_defined;
    h->u.def.value = 0;
*************** split_sections (bfd *abfd, struct bfd_li
*** 436,442 ****
  	  if (l != NULL
  	      && (thisrelocs + relocs >= config.split_by_reloc
  		  || thislines + lines >= config.split_by_reloc
! 		  || thissize + sec_size >= config.split_by_file))
  	    {
  	      /* Create a new section and put this link order and the
  		 following link orders into it.  */
--- 482,489 ----
  	  if (l != NULL
  	      && (thisrelocs + relocs >= config.split_by_reloc
  		  || thislines + lines >= config.split_by_reloc
! 		  || (thissize + sec_size >= config.split_by_file))
! 	      && !unsplittable_name (cursor->name))
  	    {
  	      /* Create a new section and put this link order and the
  		 following link orders into it.  */
Index: binutils/objdump.c
===================================================================
RCS file: /cvs/src/src/binutils/objdump.c,v
retrieving revision 1.77
diff -c -3 -p -r1.77 objdump.c
*** binutils/objdump.c	3 Sep 2003 23:43:18 -0000	1.77
--- binutils/objdump.c	19 Sep 2003 10:11:00 -0000
*************** disassemble_data (bfd *abfd)
*** 1873,1935 ****
    free (sorted_syms);
  }
  
! /* Read ABFD's stabs section STABSECT_NAME into `stabs'
!    and string table section STRSECT_NAME into `strtab'.
!    If the section exists and was read, allocate the space and return TRUE.
!    Otherwise return FALSE.  */
! 
! static bfd_boolean
! read_section_stabs (bfd *abfd, const char *stabsect_name,
! 		    const char *strsect_name)
  {
!   asection *stabsect, *stabstrsect;
  
!   stabsect = bfd_get_section_by_name (abfd, stabsect_name);
    if (stabsect == NULL)
      {
!       printf (_("No %s section present\n\n"), stabsect_name);
!       return FALSE;
!     }
! 
!   stabstrsect = bfd_get_section_by_name (abfd, strsect_name);
!   if (stabstrsect == NULL)
!     {
!       non_fatal (_("%s has no %s section"),
! 		 bfd_get_filename (abfd), strsect_name);
!       exit_status = 1;
        return FALSE;
      }
  
!   stab_size    = bfd_section_size (abfd, stabsect);
!   stabstr_size = bfd_section_size (abfd, stabstrsect);
  
!   stabs  = xmalloc (stab_size);
!   strtab = xmalloc (stabstr_size);
! 
!   if (! bfd_get_section_contents (abfd, stabsect, stabs, 0, stab_size))
      {
        non_fatal (_("Reading %s section of %s failed: %s"),
! 		 stabsect_name, bfd_get_filename (abfd),
  		 bfd_errmsg (bfd_get_error ()));
!       free (stabs);
!       free (strtab);
        exit_status = 1;
!       return FALSE;
      }
  
!   if (! bfd_get_section_contents (abfd, stabstrsect, (void *) strtab, 0,
! 				  stabstr_size))
!     {
!       non_fatal (_("Reading %s section of %s failed: %s\n"),
! 		 strsect_name, bfd_get_filename (abfd),
! 		 bfd_errmsg (bfd_get_error ()));
!       free (stabs);
!       free (strtab);
!       exit_status = 1;
!       return FALSE;
!     }
  
!   return TRUE;
  }
  
  /* Stabs entries use a 12 byte format:
--- 1873,1911 ----
    free (sorted_syms);
  }
  
! /* Read ABFD's stabs section STABSECT_NAME, and return a pointer to
!    it.  Return NULL on failure.   */
! 
! static char *
! read_section_stabs (bfd *abfd, const char *sect_name, bfd_size_type *size_ptr)
  {
!   asection *stabsect;
!   bfd_size_type size;
!   char *contents;
  
!   stabsect = bfd_get_section_by_name (abfd, sect_name);
    if (stabsect == NULL)
      {
!       printf (_("No %s section present\n\n"), sect_name);
        return FALSE;
      }
  
!   size = bfd_section_size (abfd, stabsect);
!   contents  = xmalloc (size);
  
!   if (! bfd_get_section_contents (abfd, stabsect, contents, 0, size))
      {
        non_fatal (_("Reading %s section of %s failed: %s"),
! 		 sect_name, bfd_get_filename (abfd),
  		 bfd_errmsg (bfd_get_error ()));
!       free (contents);
        exit_status = 1;
!       return NULL;
      }
  
!   *size_ptr = size;
  
!   return contents;
  }
  
  /* Stabs entries use a 12 byte format:
*************** read_section_stabs (bfd *abfd, const cha
*** 1951,1961 ****
     using string table section STRSECT_NAME (in `strtab').  */
  
  static void
! print_section_stabs (bfd *abfd, const char *stabsect_name)
  {
    int i;
    unsigned file_string_table_offset = 0;
!   unsigned next_file_string_table_offset = 0;
    bfd_byte *stabp, *stabs_end;
  
    stabp = stabs;
--- 1927,1937 ----
     using string table section STRSECT_NAME (in `strtab').  */
  
  static void
! print_section_stabs (bfd *abfd, const char *stabsect_name, unsigned *string_offset_ptr)
  {
    int i;
    unsigned file_string_table_offset = 0;
!   unsigned next_file_string_table_offset = *string_offset_ptr;
    bfd_byte *stabp, *stabs_end;
  
    stabp = stabs;
*************** print_section_stabs (bfd *abfd, const ch
*** 2015,2026 ****
--- 1991,2004 ----
  	}
      }
    printf ("\n\n");
+   *string_offset_ptr = next_file_string_table_offset;
  }
  
  typedef struct
  {
    const char * section_name;
    const char * string_section_name;
+   unsigned string_offset;
  }
  stab_section_names;
  
*************** find_stabs_section (bfd *abfd, asection 
*** 2031,2037 ****
    stab_section_names * sought = (stab_section_names *) names;
  
    /* Check for section names for which stabsect_name is a prefix, to
!      handle .stab0, etc.  */
    len = strlen (sought->section_name);
  
    /* If the prefix matches, and the files section name ends with a
--- 2009,2015 ----
    stab_section_names * sought = (stab_section_names *) names;
  
    /* Check for section names for which stabsect_name is a prefix, to
!      handle .stab.N, etc.  */
    len = strlen (sought->section_name);
  
    /* If the prefix matches, and the files section name ends with a
*************** find_stabs_section (bfd *abfd, asection 
*** 2039,2051 ****
       match or a section followed by a number.  */
    if (strncmp (sought->section_name, section->name, len) == 0
        && (section->name[len] == 0
! 	  || ISDIGIT (section->name[len])))
      {
!       if (read_section_stabs (abfd, section->name, sought->string_section_name))
  	{
! 	  print_section_stabs (abfd, section->name);
! 	  free (stabs);
! 	  free (strtab);
  	}
      }
  }
--- 2017,2033 ----
       match or a section followed by a number.  */
    if (strncmp (sought->section_name, section->name, len) == 0
        && (section->name[len] == 0
! 	  || (section->name[len] == '.' && ISDIGIT (section->name[len + 1]))))
      {
!       if (strtab == NULL)
! 	strtab = read_section_stabs (abfd, sought->string_section_name,
! 				     &stabstr_size);
!       
!       if (strtab)
  	{
! 	  stabs = read_section_stabs (abfd, section->name, &stab_size);
! 	  if (stabs)
! 	    print_section_stabs (abfd, section->name, &sought->string_offset);
  	}
      }
  }
*************** dump_stabs_section (bfd *abfd, char *sta
*** 2057,2064 ****
  
    s.section_name = stabsect_name;
    s.string_section_name = strsect_name;
!   
    bfd_map_over_sections (abfd, find_stabs_section, & s);
  }
  
  /* Dump the any sections containing stabs debugging information.  */
--- 2039,2050 ----
  
    s.section_name = stabsect_name;
    s.string_section_name = strsect_name;
!   s.string_offset = 0;
! 
    bfd_map_over_sections (abfd, find_stabs_section, & s);
+ 
+   free (strtab);
+   strtab = NULL;
  }
  
  /* Dump the any sections containing stabs debugging information.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]