Skip to contentSkip to conversation

R_PPC_REL24 relocation out of range, with trivial program

DISCUSSION Pierre Sarrazin 3 participants 3 messages Apr 3, 2000

lore
Share & tools
lore
#0 lore raw

Last month I posted the following message:

From: Pierre Sarrazin
Date: Thu, 02 Mar 2000 18:25:46 -0500

Quoted 10 lines

This is another message about the "R_PPC_REL24 relocation out of range" problem. I have a trivial program and library system that illustrates it. I have read some of the previous messages on this topic but the solutions proposed did not make a difference.

The problem happens when the dlopened library exports a C++ function returning 'string', but not when it exports a function returning 'const char *'.

Here is the program:

	[...]

The full message is at:
http://lists.linuxppc.org/listarcs/linuxppc-dev/200003/msg00025.html

I would like to know if there is a chance that this problem will be fixed soon. I have had to suspend my LinuxPPC work for the last month. My company's support for the LinuxPPC platform is delayed by this issue.

Is there a way to ask gcc to generate only long branch instructions so as to avoid this whole problem? Thanks.

--
Pierre Sarrazin <[email protected]>

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to Pierre Sarrazin

Am Mon, 03 Apr 2000 schrieb Pierre Sarrazin:

Quoted 21 lines

Last month I posted the following message:

From: Pierre Sarrazin
Date: Thu, 02 Mar 2000 18:25:46 -0500

Quoted 10 lines

This is another message about the "R_PPC_REL24 relocation out of range" problem. I have a trivial program and library system that illustrates it. I have read some of the previous messages on this topic but the solutions proposed did not make a difference.

The problem happens when the dlopened library exports a C++ function returning 'string', but not when it exports a function returning 'const char *'.

Here is the program:

	[...]

The full message is at:
http://lists.linuxppc.org/listarcs/linuxppc-dev/200003/msg00025.html

Quoted 7 lines

I would like to know if there is a chance that this problem will be fixed soon. I have had to suspend my LinuxPPC work for the last month. My company's support for the LinuxPPC platform is delayed by this issue.

Is there a way to ask gcc to generate only long branch instructions so as to avoid this whole problem? Thanks.

This seems to be fixed in the current toolchain:

[fsirl@entropy:~/bugs/reloc]$ make
g++ -g -Wall -fPIC -DSTRING_EXAMPLE -c prog.cpp
g++ -g -Wall -fPIC -DSTRING_EXAMPLE -o prog prog.o -ldl
g++ -g -Wall -fPIC -DSTRING_EXAMPLE -c f.cpp
g++ -shared -o libf.so f.o
[fsirl@entropy:~/bugs/reloc]$ ./prog
f()
s = [pizza]

Either upgrade your distribution or go to
<ftp://devel.linuxppc.org/users/fsirl>.

Franz.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/