linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Issue while linking c++ applicatiopn on Linux Power
@ 2006-01-16 12:38 Abhay Singh
  0 siblings, 0 replies; only message in thread
From: Abhay Singh @ 2006-01-16 12:38 UTC (permalink / raw)
  To: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1869 bytes --]

Hi,
I am porting a huge c++ server application on Linux Power PC.
The compiler which I am using is IBM xlC 7.0 version. The gcc version
installed is 3.3.3.
I am using xlC for building the c++ application and shared objects, as
opposed for the gcc -fPIC option, Iam using -qpic=large for creating the
position independance code.
While linking one of out libraries, we encountered an issue like "
"relocation truncated to fit: R_PPC_LOCAL24PC
_GLOBAL_OFFSET_TABLE_+fffffffffffffffc"
Then after using the -Wl,--relax as linker option we were able to create the
shared library.

Now but during the creation of the final executable during the link time, I
am facing a similar issue like

objws/opt/dcsdblk.o(.text+0xe620): In function `os_vector<DCWFormat
const*>::reserve(unsigned int)':
: relocation truncated to fit: R_PPC_LOCAL24PC
_GLOBAL_OFFSET_TABLE_+fffffffffffffffc
objws/opt/dcsdblk.o(.text+0xe70c): In function `os_allocator<DCWFormat
const*>::allocate(unsigned int, void const*)':
: relocation truncated to fit: R_PPC_LOCAL24PC
_GLOBAL_OFFSET_TABLE_+fffffffffffffffc
objws/opt/dcsdblk.o(.text+0xe790): In function `os_vector<DCWFormat
const*>::insert(DCWFormat const**, unsigned int, DCWFormat const* const&)':
: relocation truncated to fit: R_PPC_LOCAL24PC
_GLOBAL_OFFSET_TABLE_+fffffffffffffffc

Even the Wl,--relax option is noy helping us.

I saw one small c test program as 

#include <stdio.h>
char realbig[36000032] = {1,2};

int main()
{
        printf ("&realbig = %#lx\n", &realbig);
}

while compiling gives the same kind of error. Although this error vanishes,
if we do a 64 bit build using option -q64 for xlC and -m64 for gcc.

Please let me know, if there is any resolution for the above described
issue.

Thanks and regards,
Abhay Kumar Singh
Oracle India Private Limited.
Tel: 91-80-51086837


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 2468 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-16 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-16 12:38 Issue while linking c++ applicatiopn on Linux Power Abhay Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).