This is the mail archive of the binutils@sourceware.org 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: PATCH: ld/2411: ELF linker fails to create executable with more than 64k sections


On Fri, Mar 03, 2006 at 12:04:41PM -0800, H. J. Lu wrote:
> On Fri, Mar 03, 2006 at 11:04:03AM -0800, H. J. Lu wrote:
> > On Fri, Mar 03, 2006 at 09:15:53AM -0800, H. J. Lu wrote:
> > > On Fri, Mar 03, 2006 at 02:43:51PM +1030, Alan Modra wrote:
> > > > On Thu, Mar 02, 2006 at 03:21:25PM -0800, H. J. Lu wrote:
> > > > > The ELF gABI doesn't support more than 64k sections in DSO and
> > > > > executable when there are dynamic symbols. This patch checks that.
> > > > 
> > > > I think you should put this check in bfd_elf_final_link rather than in
> > > > map_sections_to_segments, before the first call to
> > > > elf_link_output_extsym.  That puts it close to the code that outputs
> > > > dynamic section syms.
> > > > 
> > > > > +	(_("%B: Too many sections: %d (< %d)"),
> > > > > +	 abfd, bfd_count_sections (abfd), SHN_LORESERVE);
> > > > 
> > > > Typo.
> > > > 
> > > 
> > > Here is the updated patch.
> > > 
> > > 
> > 
> > It is OK to have dynamic symbols with 64K sections, which is one of
> > the old testcases, as long as the dynamic symbols aren't in the
> > sections beyond 64K. This patch checks section index for each dynamic
> > symbol to make sure it is supported.
> > 
> 
> I had a typo in my last patch. Here is the right one.
> 

Can someone please take a look at

http://sourceware.org/ml/binutils/2006-03/msg00055.html

Thanks.


H.J.


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