This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: BZ/175: Fix dynamic string offset
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jim Wilson <wilson at specifixinc dot com>
- Cc: jakub at redhat dot com, binutils at sources dot redhat dot com
- Date: Wed, 2 Jun 2004 12:21:44 -0700
- Subject: Re: PATCH: BZ/175: Fix dynamic string offset
- References: <20040529222358.GA9983@lucon.org> <1086038644.1064.4.camel@leaf.tuliptree.org>
On Mon, May 31, 2004 at 02:24:03PM -0700, Jim Wilson wrote:
> On Sat, 2004-05-29 at 15:23, H. J. Lu wrote:
> > I think Alan may be right. I backed out my patch for the time being. I
> > think we should pass r_addend to _bfd_merged_section_offset only for
> > section symbols. For local and global symbols, merge will adjust their
> > st_values. We shouldn't pass r_addend against them to
> > _bfd_merged_section_offset.
>
> This looks reasonable to me, not that I know what I'm talking about
> though. This seems to implement the idea of keeping internal and
> programmer offsets separate, as you aren't passing the programmer offset
> through to bfd_merged_section_offset now.
>
> If this is right, then does that imply that elf32-ppc.c and
> elf64-alpha.c are broken?
As far as I can tell, _bfd_merged_section_offset is used to adjust
either the value of a symbol or the addend of a relocation. If it is
used for value, addend shouldn't be passed to _bfd_merged_section_offset
directly and should be added onto its return value.
H.J.