This is the mail archive of the binutils@sources.redhat.com 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: Objcopy fix for relocation sections


On Wed, Sep 08, 2004 at 09:27:00AM +0930, Alan Modra wrote:
> After having a good look at what is going on here, I believe the
> following patch is the correct solution.  Would you please check
> that it fixes the original problem?  I tested that this change
> cures a similar problem on powerpc-linux (at least the FSF version,
> where we output debug relocs).  Prior to this patch, using a .so
> created during the ld testsuite run, I get
> 
> $ ../../binutils/objcopy vp.so xxx.so
> ../../binutils/objcopy: xxx.so: File truncated
> 
> As the comment I added says, some reloc sections are not handled
> specially by bfd (see bfd_section_from_shdr).  These should be
> treated as normal bfd sections.
> 
> 	* elf.c (assign_file_positions_except_relocs): Assign relocs
> 	stored in a bfd section.

Thanks!  Your explanation makes sense, and this also works for my test
cases.

-- 
Daniel Jacobowitz


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