This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: relocation in PowerPC
- To: michael_liaocn at yahoo dot com
- Subject: Re: relocation in PowerPC
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Thu, 28 Jun 2001 11:56:38 -0700
- CC: libc-alpha at sources dot redhat dot com
- References: <20010628105448.54594.qmail@web9908.mail.yahoo.com>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Date: Thu, 28 Jun 2001 03:54:48 -0700 (PDT)
> From: Michael Liao <michael_liaocn@yahoo.com>
>
> Hi, I can't understand the following codes from
> glibc-2.2.3/sysdeps/powerpc/dl-machine.c around line
> 445.
>
> if (rinfo != R_PPC_ADDR14)
> *reloc_addr = ((*reloc_addr & 0xffdfffff) | ((rinfo
> == R_PPC_ADDR14_BRTAKEN) ^ (finaladdr >> 31)) << 21);
>
> why the branch prediction bit is set also by the MSB
> of the finaladdr.
>
> Could anyone tell why?
On PowerPC, the meaning of the bit changes depending on whether it's a
forward or backward branch.
--
- Geoffrey Keating <geoffk@geoffk.org>