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: PR ld/4007: Linker failed to issue an error on bad section in segment


On Tue, Mar 27, 2007 at 06:30:12AM -0700, H. J. Lu wrote:
> On Tue, Mar 27, 2007 at 06:43:16PM +0930, Alan Modra wrote:
> > On Thu, Mar 22, 2007 at 08:47:41AM -0700, H. J. Lu wrote:
> > > 	* ld-elf/note-1.d: New file.
> > > 	* ld-elf/note-1.s: Likewise.
> > > 	* ld-elf/note-1.t: Likewise.
> > 
> > This fails on spu, due to that target rounding up the data segment
> > p_filesz and p_memsz.  readelf then thinks that the note is also
> > in the data segment.  Do you have any objection to modifying the
> > test as follows?
> > 
> 
> Isn't it a bug in readelf? How can I reproduce it?

I got

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg
Align
  LOAD           0x000080 0x01000000 0x01000000 0x00010 0x00010 RWE
0x80
  NOTE           0x000081 0x02000000 0x02000000 0x00001 0x00000 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00     .foo .note 
   01     .note 

It does look odd. If you think it is OK, I have no problem to adjust
testcase.


H.J.


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