Bart Smaalders wrote: > On 03/17/10 14:12, John Vasquez wrote: >> Newbie here. >> >> I compile some source code using cc -m64 >> >> However, I can't seem to link the objects. I'm getting the >> error,"Relocatable linking with relocation from elf64-x86-64 to format >> elf32-i386 is not supported". >> >> My ld command line is: >> ld -r -o outfile obj1.o obj1.o >> >> What am I doing wrong? > > Add -64 option? > > Bart > >
-64 shouldn't be necessary, as ld will intuit what to do from the first object on the line. That error looks to me as if it came from the GNU ld, which unfortunately is at the beginning of the default path under OpenSolaris. Try running /usr/bin/ld explicitly. - Ali