[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creatin' n' linkin' shared libs with cris-g++

Hello folks,

I'm currently porting GNU's cgicc libraries to
an etrax system but have some problems.

Even if I ingnore all the automake stuff and simply
compile and link the library manually like:

cris-g++ -I.. -DVERSION=\"1.22\" -DHOST=\"test\" -fPIC -mlinux -c *.cpp
cris-g++ -shared -Wl,-soname,libcgicc.so *.o -o libcgicc.so.1.22

wich seems to produce a proper library with no errors or warnings:

cris-readelf -h libcgicc.so.1.22
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           Axis Communications 32-bit embedded
  Version:                           0x1
  Entry point address:               0x1dcc0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          263748 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         3
  Size of section headers:           40 (bytes)
  Number of section headers:         29
  Section header string table index: 26

Still when I try to compile a simple test app
shipped with cgicc and link it against the shared lib
all seems to go wrong in worst possible way:

cris-g++ -I.. -c upload.cpp
cris-g++ -L. -lcgicc upload.o -o upload.cgi
./libcgicc.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

It first seemed that I have accidently compiled some
code for i386 but even if I remove every possible bit of
binary code and compile again with cris-g++ there is
no sign of a better future.

Any ideas anyone?

Thanks a lot in advance!

Sampo Nurmentaus