Bug#624354: Processed: Re: Bug#624354: ./xpcshell: error while loading shared libraries: ./libxul.so: R_PPC_REL24 relocation at 0x0f9f0148 for symbol `_restgpr_29_x' out of range
- To: Michel Dänzer <daenzer@debian.org>
- Cc: Matthias Klose <doko@debian.org>, 624354@bugs.debian.org, Cyril Brulebois <kibi@debian.org>, debian-powerpc@lists.debian.org
- Subject: Bug#624354: Processed: Re: Bug#624354: ./xpcshell: error while loading shared libraries: ./libxul.so: R_PPC_REL24 relocation at 0x0f9f0148 for symbol `_restgpr_29_x' out of range
- From: Mike Hommey <mh@glandium.org>
- Date: Thu, 28 Apr 2011 12:27:18 +0200
- Message-id: <20110428102718.GB10282@glandium.org>
- Reply-to: Mike Hommey <mh@glandium.org>, 624354@bugs.debian.org
- In-reply-to: <20110428101646.GC9846@glandium.org>
- References: <1303982255.5633.218.camel@thor.local> <20110428092506.GA7806@glandium.org> <20110428093216.GB7806@glandium.org> <20110428094048.GA8307@glandium.org> <20110428095518.GA8610@glandium.org> <1303984864.5633.229.camel@thor.local> <20110428100442.GA9729@glandium.org> <20110428101054.GA9846@glandium.org> <20110428101441.GB9846@glandium.org> <20110428101646.GC9846@glandium.org>
On Thu, Apr 28, 2011 at 12:16:46PM +0200, Mike Hommey wrote:
> reassign 624354 gcc-4.5
> thanks
>
> On Thu, Apr 28, 2011 at 12:14:41PM +0200, Mike Hommey wrote:
> > On Thu, Apr 28, 2011 at 12:10:54PM +0200, Mike Hommey wrote:
> > > On Thu, Apr 28, 2011 at 12:04:42PM +0200, Mike Hommey wrote:
> > > > Let me write it again:
> > > > - The R_PPC_REL24 relocations are all over libxul.so on objects that are
> > > > built -fPIC.
> > > > - libcrmf.a is also linked into libxul.so, and it also contains
> > > > R_PPC_REL24 relocations, but all the objects it contains are built
> > > > -fPIC.
> > >
> > > And this is a -Os bug, apparently. Building with -O2 doesn't seem to
> > > yield these relocations.
> >
> > I'm attaching a preprocessed source that yields the problem.
> >
> > $ gcc -o encutil.o -Os -fPIC -c encutil.i
> > $ readelf -r encutil.o
> >
> > Relocation section '.rela.text' at offset 0x478 contains 4 entries:
> > Offset Info Type Sym.Value Sym. Name + Addend
> > 0000004e 000005fc R_PPC_REL16_HA 00000000 .got2 + 8012
> > 00000052 000005fa R_PPC_REL16_LO 00000000 .got2 + 8016
> > 0000006c 00000b12 R_PPC_PLTREL24 00000000 SEC_ASN1Encode_Util + 8000
> > 0000007c 00000c0a R_PPC_REL24 00000000 _restgpr_30_x + 0
> >
> > Relocation section '.rela.got2' at offset 0x4a8 contains 1 entries:
> > Offset Info Type Sym.Value Sym. Name + Addend
> > 00000000 00000901 R_PPC_ADDR32 00000000 crmf_encoder_out + 0
> >
> > $ gcc -o encutil.o -O2 -fPIC -c encutil.i
> > $ readelf -r encutil.o
> >
> > Relocation section '.rela.text' at offset 0x480 contains 3 entries:
> > Offset Info Type Sym.Value Sym. Name + Addend
> > 0000005a 000005fc R_PPC_REL16_HA 00000000 .got2 + 8022
> > 0000005e 000005fa R_PPC_REL16_LO 00000000 .got2 + 8026
> > 00000078 00000b12 R_PPC_PLTREL24 00000000 SEC_ASN1Encode_Util + 8000
> >
> > Relocation section '.rela.got2' at offset 0x4a4 contains 1 entries:
> > Offset Info Type Sym.Value Sym. Name + Addend
> > 00000000 00000901 R_PPC_ADDR32 00000000 crmf_encoder_out + 0
> >
>
> And with gcc-4.4:
> $ gcc-4.4 -o encutil.o -Os -fPIC -c encutil.i
> $ readelf -r encutil.o
>
> Relocation section '.rela.text' at offset 0x474 contains 3 entries:
> Offset Info Type Sym.Value Sym. Name + Addend
> 0000005a 000005fc R_PPC_REL16_HA 00000000 .got2 + 8022
> 0000005e 000005fa R_PPC_REL16_LO 00000000 .got2 + 8026
> 00000078 00000b12 R_PPC_PLTREL24 00000000 SEC_ASN1Encode_Util + 8000
>
> Relocation section '.rela.got2' at offset 0x498 contains 1 entries:
> Offset Info Type Sym.Value Sym. Name + Addend
> 00000000 00000901 R_PPC_ADDR32 00000000 crmf_encoder_out + 0
And a smaller testcase exhibiting the problem:
extern int bar();
int foo() {
return bar();
}
Reply to: