This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: Versioning mess proved!!!


> Cc: Franz.Sirl-kernel@lauterbach.com, philb@gnu.org, howarth@fuse.net,
>         libc-alpha@sourceware.cygnus.com, aj@suse.de
> Reply-To: drepper@cygnus.com (Ulrich Drepper)
> From: Ulrich Drepper <drepper@redhat.com>
> Date: 01 Oct 2000 15:46:18 -0700
> User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Capitol Reef)
> 
> Geoff Keating <geoffk@cygnus.com> writes:
> 
> > Nope.  The other two should have two relocations too.
> > 
> > I expect the code that calls __gmon_start__ looks like:
> > 
> > 	lwz r3,__gmon_start__@got(r31)
> > 	cmpwi r3,0
> > 	beq L1234
> > 	bl  __gmon_start__@plt
> > L1234:
> > 
> 
> But that's exactly what is supposed to be avoided.  On x86 the
> generated code looks like this:
> 
>         movl    __gmon_start__@GOT(%ebx), %eax
>         testl   %eax, %eax
>         je      .L22
>         call    *%eax
> 
> I.e., no use of __gmon_start__ as a jump target.  Since I have no PPC
> machine handy I cannot say whether you get similar code.  If you do
> seeing two relocations is wrong and can only be produced by the file
> splitting.

Why is it wrong?

It just means that the PLT entry will jump to location 0, but that
should never happen because the entry in the GOT will be zero since
the symbol is never defined.

-- 
- Geoffrey Keating <geoffk@cygnus.com>

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