This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: relocation error: R_AMD64_PC32


asyropoulos@aol.com writes:

> The 32bit was easy and works as it should. However, the 64bit does not
> compile and it stops with the following error message:
>
> ./perl -f -Ilib pod/buildtoc --build-toc -q
> Can't load 'lib/auto/re/re.so' for module re: ld.so.1: perl: fatal:
> relocation error: R_AMD64_PC32:
> file lib/auto/re/re.so: symbol main: value 0x28006b7dd34 does not fit
> at lib/XSLoader.pm line 70.
>
> I did a Google search and I had found out that this error message is
> produced when the compile
> tries to link position dependent code into a shared object. According
> to the GCC manual one needs
> to specify the -fPIC flag to ensure that position independent code is
> produced. In my case, the perl
> configuration script says that it will use this flag by default and it
> is used yet it does not help. Also,
> the -mimpure-text does not help when used when linking. So can anybody
> suggest a way to deal
> with this problem? Note that solstudio12.2 compiles perl with no
> problem, but there are a number
> of things that cannot be compiled with solstudio12.2.

I think you have to talk to the perl developers.  If the code is
compiled with -fPIC, and nothing else is affecting the code, this
particular error should not occur.  So my first guess would be that
something else is affecting this, such as a version script or something
explicitly setting the symbol visibility.

Ian


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