This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: bfd/elf.c : bfd_seek to 0 valid ?
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: jeroen dobbelaere <jeroen dot dobbelaere at acunia dot com>
- Cc: Richard dot Earnshaw at arm dot com, binutils at sources dot redhat dot com
- Date: Thu, 07 Nov 2002 15:16:48 +0000
- Subject: Re: bfd/elf.c : bfd_seek to 0 valid ?
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw wrote:
> [..]
>
> >
> >
> > Well, since pos is calculated to be hdr->sh_offset + offset, and since it
> > seams reasonable for offset to be zero, the question has to be (assuming
> > offset can't be negative!) is it legitimate for hdr->sh_offset to zero.
> >
> > My guess is that the answer to that question should normally be 'no', and
> > the reason for it being so is that the section hasn't been mapped into the
> > output bfd.
> >
> > R.
> >
>
> section->name = '.rel.dyn' (output section); the content itself comes from a '.rel.got'.
>
> I have the impression, that for some reason, the .rel.dyn section does not
> get a fileposition assigned (resulting in the hdr->sh_offset == 0).
>
> Where should this mapping to the output bfd happen ?
>
>
The linker script?
R.