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

Re: R_PPC_REL24 relocation out of range



On Thu, Jul 26, 2001 at 07:09:51PM -0600, Bradley C. Midgley wrote:
> i've found that the invocation of the shared-object creation line makes a
> difference.
> 
> the original invocation, pulling DynaLoader.a explicitly has getenv in a
> REL24 relocation:
> 
> bmidgley@clam:~/cockpit/build/linuxgcc/scripting$ g++ -fpic -shared -o
> libscripting-1-0.so PerlScriptingDef.o PerlWrapper.o ScriptingModuleDef.o
> -rdynamic /usr/lib/perl/5.6.0/auto/DynaLoader/DynaLoader.a  && readelf -r
> libscripting-1-0.so | grep getenv
>   00016890  0840a R_PPC_REL24           00000000  getenv
> + 0
>   00038d9c  08415 R_PPC_JMP_SLOT        00000000  getenv
> + 0
> 
> without naming DynaLoader.a, getenv has no R_PPC_REL24 relocation entry.
> 
> bmidgley@clam:~/cockpit/build/linuxgcc/scripting$ g++ -fpic -shared -o
> libscripting-1-0.so PerlScriptingDef.o PerlWrapper.o ScriptingModuleDef.o
> -rdynamic && readelf -r libscripting-1-0.so | grep getenv
>   00036864  07915 R_PPC_JMP_SLOT        00000000  getenv
> + 0
> 
> is it legal to invoke a .a when creating a .so? it seems to make the
> difference in creating a valid .so

Sure.  But if you're using DynaLoader from 5.6.0, see the archives of
debian-perl for your problem.  Use current 5.6.1 packages from
unstable; DynaLoader contained non-PIC code.

(If you've got 5.6.1 installed, why on earth are you using 5.6.0's
DynaLoader?  I'm guessing you're actually running testing.)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer



Reply to: