Fix split stab section handling

Nathan Sidwell nathan@codesourcery.com
Fri Sep 19 10:18:00 GMT 2003


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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 90277-2.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20030919/7acad5b0/attachment.ksh>


More information about the Binutils mailing list