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 Thu, Sep 09, 2004 at 01:22:10PM -0400, Hans-Peter Nilsson wrote:
> On Thu, 9 Sep 2004, Daniel Jacobowitz wrote:
> > On Wed, Sep 08, 2004 at 09:27:00AM +0930, Alan Modra wrote:
> > > $ ../../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.
> 
> With regards to testcases, it might not be obvious, but it looks
> like a job for run_dump_test with objcopy_linked_file in the ld
> testsuite (which I agree might not be the intuitive place but at
> least the framework is there).

As I said earlier, I've tried to write a testcase for this using FSF
binutils and failed.  You're welcome to take a shot at it. All it
should require is a shared object which contains a non-loadable
relocation section.

-- 
Daniel Jacobowitz


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