This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Objcopy fix for relocation sections
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: Daniel Jacobowitz <drow at false dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 9 Sep 2004 13:22:10 -0400 (EDT)
- Subject: Re: Objcopy fix for relocation sections
- References: <20031222210543.GA3418@nevyn.them.org> <20031223032137.GD1618@bubble.sa.bigpond.net.au><20040727210426.GA11595@nevyn.them.org> <20040803225601.GA22637@nevyn.them.org><20040805092703.GF12879@bubble.modra.org> <20040805131429.GA14075@nevyn.them.org><20040907235700.GL22095@bubble.modra.org> <20040909163903.GA20330@nevyn.them.org>
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).
brgds, H-P