This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Fix split stab section handling
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 18 Sep 2003 10:08:43 -0700
- Subject: Re: Fix split stab section handling
- References: <3F697C41.30101@codesourcery.com>
Nathan Sidwell <nathan@codesourcery.com> writes:
> 2) The generated name of a split section uses the first 5 characters
> of the original name (why?). Thus causing a split .stab.excl etc not to
> be able to find their associated .stab.exclstr string section. Fixed by
> not truncating stab section names this way
In general I think your patches are good ones.
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
true for the backend, or if it is ELF. (Is there any reason you are
using --split-* for ELF?)
On a different note, I think !strncmp is a bad idiom. It suggests the
opposite of what it means. Use == 0 instead.
Ian