Hi...
I have a problem with .so files on a 7.2 system. I have a big library of
some hand made programs. I make a .a libfile, and it works perfectly.
If I make a .so file, it seems to work, but a program using it receives a
SEGV.
If I make the .so file on a Mandrake 7.1, it works perfectly.
nm gives a diff between the 2 .so files, and no diff between the 2 .a
files. The diff is that in 7.1, there is another symbol, a:
00003dc0 A _etext
that is not in the .so file given by 7.2.
Here are some more infos:

[root@arthur Linux-i686]# uname -a 
Linux arthur.cdas.augernet 2.2.17-21mdksmp #1 SMP Thu Oct 5 13:03:01 CEST 2000 i686 
unknown
[root@arthur Linux-i686]# gcc -shared -v -o libmoClient.so MoMess.o MoBits.o MoPrint.o 
MoStore.o MoRcvMess.o
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)
 /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/collect2 -m elf_i386 -shared -o 
libmoClient.so /usr/lib/crti.o /usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtbeginS.o 
-L/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3 -L/usr/i586-mandrake-linux/lib MoMess.o 
MoBits.o MoPrint.o MoStore.o MoRcvMess.o -lgcc -lc -lgcc 
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtendS.o /usr/lib/crtn.o 

 --> this .so file is not working

The "bug" might be in my program, but some gdb stuff indicates it SEGV
trying to address a space not allowed, that is allowed when statically
linked. The disapparition of the "A _etext" in the .so file surprises me.

If I use /usr/lib/gcc-lib/i586-mandrake-linux/2.95.2/crtendS.o from a 7.1
distribution instead of the
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtendS.o from the 7.2
distribution, it works...

Let's conclude I am a bit puzzled... What is this _etext symbol missing
from the .so library when I link with 
/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3/crtendS.o ?
Any comment is welcomed,
-- 
Xavier

Reply via email to