Create an so file

2004-11-25 Thread Seifeddine BEN JALLEL
Hi, 

I'm working on SOLARIS machine, and i have a problem. So on trying to create 
the .so file with gcc command line, a fatal error was shown on the screen.

Command lines :
  gcc -c -I/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/ 
  -I/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/solaris -o GenExt2FS.o 
  GenExt2FS.c
  gcc -o GenExt2FS.so -shared GenExt2FS.o -lgcc


The attached file contain the output of the second command.

Best regards.
Text relocation remains referenced
against symbol  offset  in file
fs  0x9e4   GenExt2FS.o
fs  0x9e8   GenExt2FS.o
fs  0x9fc   GenExt2FS.o
fs  0xa00   GenExt2FS.o
fs  0xa28   GenExt2FS.o
fs  0xa2c   GenExt2FS.o
fs  0xa44   GenExt2FS.o
fs  0xa48   GenExt2FS.o
fs  0xa4c   GenExt2FS.o
fs  0xa50   GenExt2FS.o
fs  0xc70   GenExt2FS.o
fs  0xc74   GenExt2FS.o
fs  0xc90   GenExt2FS.o
fs  0xc94   GenExt2FS.o
fs  0xc9c   GenExt2FS.o
fs  0xca0   GenExt2FS.o
fs  0xcb4   GenExt2FS.o
fs  0xcb8   GenExt2FS.o
fs  0xccc   GenExt2FS.o
fs  0xcd0   GenExt2FS.o
fs  0xce8   GenExt2FS.o
fs  0xcec   GenExt2FS.o
fs  0xcf0   GenExt2FS.o
fs  0xcf4   GenExt2FS.o
fs  0xd7c   GenExt2FS.o
fs  0xd80   GenExt2FS.o
fs  0xd84   GenExt2FS.o
fs  0xd88   GenExt2FS.o
fs  0xe08   GenExt2FS.o
fs  0xe0c   GenExt2FS.o
fs  0xe24   GenExt2FS.o
fs  0xe28   GenExt2FS.o
fs  0xe40   GenExt2FS.o
fs  0xe44   GenExt2FS.o
fs  0xe9c   GenExt2FS.o
fs  0xea0   GenExt2FS.o
fs  0xea8   GenExt2FS.o
fs  0xeac   GenExt2FS.o
fs  0xeb4   GenExt2FS.o
fs  0xeb8   GenExt2FS.o
fs  0xeec   GenExt2FS.o
fs  0xef0   GenExt2FS.o
fs  0xf30   GenExt2FS.o
fs  0xf34   GenExt2FS.o
fs  0xf3c   GenExt2FS.o
fs  0xf40   GenExt2FS.o
fs  0xf54   GenExt2FS.o
fs  0xf58   GenExt2FS.o
fs  0xf6c   GenExt2FS.o
fs  0xf70   GenExt2FS.o
fs  0xf88   GenExt2FS.o
fs  0xf8c   GenExt2FS.o
fs  0xfe0   GenExt2FS.o
fs  0xfe4   GenExt2FS.o
fs  0x1030  GenExt2FS.o
fs  0x1034  GenExt2FS.o
fs  0x104c  GenExt2FS.o
fs  0x1050  GenExt2FS.o
fs  0x10b0  GenExt2FS.o
fs  0x10b4  GenExt2FS.o
fs  0x10b8  GenExt2FS.o
fs  0x10bc  GenExt2FS.o
fs  0x111c  GenExt2FS.o
fs  0x1120  GenExt2FS.o
fs  0x1138  GenExt2FS.o
fs  0x113c  GenExt2FS.o
fs  0x1154  GenExt2FS.o
fs  0x1158  GenExt2FS.o
fs  0x11ac  GenExt2FS.o
fs  0x11b0  GenExt2FS.o
fs  0x11b8  GenExt2FS.o
fs  0x11bc  GenExt2FS.o
fs  0x11c4  GenExt2FS.o
fs  0x11c8  GenExt2FS.o
fs

Re: Create an so file

2004-11-25 Thread Eric Botcazou
 I'm working on SOLARIS machine, and i have a problem. So on trying to
 create the .so file with gcc command line, a fatal error was shown on the
 screen.

 Command lines :
   gcc -c -I/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/
   -I/sw/java/j2sdk/v1.4.2/j2sdk1.4.2/include/solaris -o GenExt2FS.o
   GenExt2FS.c gcc -o GenExt2FS.so -shared GenExt2FS.o -lgcc

 The attached file contain the output of the second command.

Compile your source file with -fPIC.  And you probably don't need -lgcc.

-- 
Eric Botcazou