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


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


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