crt1.o: could not read symbols: Bad value

Tim via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 10 13:03:31 PDT 2014


Hi guys,

I've the following few lines:


module test;

export:
extern(D):


int test()
{
	return 0;
}

... and compile it using the following line:

dmd -m64 -fPIC -L-shared test.d -oflibtest.so

But when I try to compile it, I always get the following error:

/usr/bin/ld: 
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o: 
relocation R_X86_64_32S against `__libc_csu_fini' can not be used 
when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/crt1.o: 
could not read symbols: Bad value
collect2: ld gab 1 als Ende-Status zurück
--- errorlevel 1

Any suggestions how to solve the problem?


More information about the Digitalmars-d-learn mailing list