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/2537: Linker doesn't allow sections reserved for applications.


On Wed, Apr 19, 2006 at 12:05:25PM +0930, Alan Modra wrote:
> On Tue, Apr 18, 2006 at 07:01:46PM -0700, H. J. Lu wrote:
> > On Wed, Apr 19, 2006 at 10:03:39AM +0930, Alan Modra wrote:
> > > On Tue, Apr 18, 2006 at 05:13:19PM -0700, H. J. Lu wrote:
> > > > On Wed, Apr 19, 2006 at 09:20:16AM +0930, Alan Modra wrote:
> > > > > On Tue, Apr 18, 2006 at 09:01:10AM -0700, H. J. Lu wrote:
> > > > > > Here is the updated patch. If section reserved for applications has
> > > > > > SHF_ALLOC, linker can't handle it properly.
> > > > > 
> > > > > I'm curious.  Why doesn't the linker do what you expect?
> > > > 
> > > > It is not what I expect. It is I don't know what applications will
> > > > expect.
> > > 
> > > Why is this any different for non-SHF_ALLOC sections?
> > 
> > non-SHF_ALLOC sections won't be the parts of image. We don't need to
> > put them in segments.
> 
> Yes.
> 
> > We can leave them as is without changing the
> > final image.
> 
> Well, maybe.  To be pedantic, they might need combining in special
> ways.  However, I suppose just packing them together is the most
> reasonable thing to do.
> 
> Next question: What about SHT_LOPROC thru SHT_HIPROC that aren't handled
> by the backend function?  And SHT_LOOS thru SHT_HIOS?  I think you ought
> to be consistent about unknown section types in these ranges.  ie. If
> SHT_LOUSER thru SHT_HIUSER is acceptable, then so should the others.
> 

bed->elf_backend_section_from_shdr should handle SHT_LOPROC thru
SHT_HIPROC and SHT_LOOS thru SHT_HIOS since they are the part of psABI
or osABI. Otherwise, they won't be processed correctly.


H.J.


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