This is the mail archive of the 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: More than 65536 sections in an ELF file

Hi Ian,

On Fri, Mar 7, 2008 at 4:18 PM, Ian Lance Taylor <> wrote:
> It seems to me that the support in BFD for ELF files with more than
>  65536 sections is at least partially wrong.  This code in
>  assign_section_numbers
>   if (section_number == SHN_LORESERVE)
>     section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
>  causes a range of section numbers to be skipped.  The effect is that
>  any links to sections with an index larger than SHN_LORESERVE are
>  incremented.  This is effectively undone in elf_object_p in elfcode.h,
>  which skips that range when building an array.
>  I just built an ELF object file with 70010 sections.  As usual, the
>  section string table is near the end of the sections, which means
>  that its index is greater than SHN_LORESERVE == 0xff00.

Icc has generated files with more than 65536 sections. I am not aware of any
problem. Can you open a bug report with a script to generate a file with more
than 65536 sections and show the problem with readelf?



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