[davidm@napali.hpl.hp.com: Re: [PATCH] i386 vsyscall DSO implementation]

Jakub Jelinek jakub@redhat.com
Sun Jun 15 12:58:00 GMT 2003


On Sat, Jun 14, 2003 at 09:41:11PM -0700, Jim Wilson wrote:
> On Sat, 2003-06-14 at 21:19, H. J. Lu wrote: 
> > Under what condition will the offset between 2 segments change? Even
> > with shared library, I don't think the offset between 2 segments
> > will change.
> 
> I dunno.  I'm not an expert with this stuff.  However, I do believe that
> there are systems that will load segments and then relocate them.  If
> this happens, there is no guarantee that offsets between segments will
> remain the same.  This will not work if you have segrel relocs that span
> segment boundaries, as your example does.  I doubt that this is a
> problem for linux though.

You certainly cannot change the distance between 2 loadable segments.
If you did, it would e.g. break all @gprel relocations in one of the
segments, so I don't see why segrel shouldn't be supported accross segments.
And hjl's patch from what I see is testing for the same section, not
segment, which doesn't look right.

	Jakub



More information about the Binutils mailing list