[LLVMdev] large modules, PPC on OS X, "ld: 32-bit pic-base out of range in"

Robb Kistler rkistler at arxan.com
Thu Mar 11 17:47:25 PST 2010


I'm trying to build a very large shared library (bundle) for PPC on Mac OS X 10.5.  The build looks something like this, where mybundlebitcode.o is the large object

llc -relocation-model=pic -o=mybundle.s mybundlebitcode.o 
gcc -arch ppc -c -x assembler -o mybundle.o mybundle.s
g++ -o mybundle.bundle -bundle mybundle.o -lotherlibrary

I get the following error:
	ld: 32-bit pic-base out of range in somefunction(Array<unsigned char, 40ul> const&)from mybundle.o

Normally I'd try to build with the -mlongcall option, but it doesn't appear that llc has support for this.  Is there some way to get llc to generate "long calls"?  

Thanks!



More information about the llvm-dev mailing list