[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#215254: [Fwd: Re: prelink does not work correctly on powerpc]



Michel Dänzer <daenzer@debian.org> writes:

> From: Smurf <smurf@play.smurf.noris.de>
> Subject: Re: prelink does not work correctly on powerpc
> To: Vincent Bernat <bernat@free.fr>
> Cc: Debian Bug Tracking System <submit@bugs.debian.org>, debian-powerpc@lists.debian.org
> Date: Sat, 11 Oct 2003 18:17:13 +0200
> Message-ID: <[🔎] 20031011161713.GA21521@play.smurf.noris.de>
> User-Agent: Mutt/1.5.0-gpgme-021125a
>
> Hi,
>
>> mplayer: error while loading shared libraries: /usr/lib/libavcodec.so.0.4.8:
>> R_PPC_REL24 relocation at 0x0fe3d560 for symbol fwrite' out of range
>> 
> Ouch. REL24 is a three-byte address space, i.e. a maximum range of 64
> MBytes (two bits are saved because of 4-byte alignment).
>
> Therefore, the definitions in src/addr-ppc.c,
>
> #define REG0S   0x0e800000
> #define REG0E   0x10000000
> #define REG1S   0x00040000
> #define REG1E   REG0S
> #define REG2S   0x18000000
> #define REG2E   0x30000000
>
> are somewhat broken. (I don't know enough about the internals of the
> prelinker to know which to touch, other than REG1S and REG2E which set
> the mmap range; see the end of this file).

They are not broken, they are what glibc does too.
The bug is elsewhere.
R_PPC_REL24 relocation can show only in non-pic shared libraries on PPC,
which is a bad idea on all platforms (some don't allow it at all even).
They are always a lottery on PPC, you have to be lucky so that
they are mapped close to their target. With prelink the chances are lower,
since prelink has to fit all libraries which ever come together
into virtual address space, not just the ones one particular application
is linked against.

>
> -- 
> Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
> Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
>  - -
> A right is not what someone gives you; it's what no one can take from you.
> -- Ramsey Clark
>
>
> -- 
> To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
> ----------
>

-- 
Andres Roldan <aroldan@debian.org>
GPG Key-ID: 0xB29396EB

Attachment: pgpgVEqdg3m2c.pgp
Description: PGP signature


Reply to: