Bugs using -fPIC on linux (i86 RedHat 5.0)?
Marius Kjeldahl
marius@ace.funcom.com
Mon Dec 29 06:22:00 GMT 1997
I am having trouble building a shared library under linux. Everything
seems to be built ok and even run if I do not use -fPIC while
compiling (I do not know _why_ it runs without -fPIC - maybe it simply
does not gain me the real benefit of a shared library, meaning several
applications will load the library into their own private memory space
- just guessing here).
So, in trying to do the right thing, I try to compile it with -fPIC,
but then compilation fails.
In short, it works with: gcc -c somefile.cpp -o somefile.o
but not with: gcc -fPIC -c somefile.cpp -o somefile.o
The latter yields the following messages:
/tmp/cca05529.s: Assembler messages:
/tmp/cca05529.s:52: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:9966: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:10003: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:10014: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:10026: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11027: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11152: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11164: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11558: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11571: Error: invalid char '@' begining first operand '@PLT'
/tmp/cca05529.s:11590: Error: invalid char '@' begining first operand '@PLT'
make: *** [mfset.o] Error 1
In looking at the temporary assembler file, the lines it objects to is:
call @PLT
Can anybody with a clue sched some light on this?
Marius
gcc -v outputs:
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.91.03/specs
gcc version egcs-2.91.03 971225 (gcc-2.8.0)
More information about the Gcc
mailing list