Problem with shared library generated on Solaris 8 X86
From: Trond Norbye (trond.norbye_at_gmail.com)
Date: 08/11/04
- Next message: Tonij: "Re: Considering cosolodation for 120+ Oracle instances"
- Previous message: Beardy: "Re: GPL'ing Solaris won't save SUN"
- Next in thread: Trond Norbye: "Re: Problem with shared library generated on Solaris 8 X86"
- Reply: Trond Norbye: "Re: Problem with shared library generated on Solaris 8 X86"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Aug 2004 15:07:35 +0200
I have recently discovered a problem with shared libraries created on
solaris 8 X86. To me it seems that it is a bug introduced in an OS
patch, since I don't have the same problem on some of my more or less
unpatched systems. I have been able to create a small example to
reproduce the problem:
trondn@solsrv2 cctest> uname -a
SunOS solsrv2 5.8 Generic_108529-29 i86pc i386 i86pc
trondn@solsrv2 ~> cc -V
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111680-09 2003/05/18
trondn@solsrv2 cctest> make
cc -v -c main.c
cc -v -c -g -KPIC func.c
cc -v -c -g -KPIC func_ver.c
cc -v -o libfunc.so -G func.o func_ver.o
cc -v -o testprog -R. -L. main.o -lfunc
trondn@solsrv2 cctest> dbx -V testprog
Sun WorkShop 6 update 2 Dbx Debugger 6.2 Patch 111684-14 2003/10/21
Reading testprog
Reading ld.so.1
Reading libfunc.so
dbx: panic: "Objfile::objname"(): Assertion (lo->syms_read) failed -
"objfile.cc":1419
I have attached the files I used to track down the problem.
Note that if I add a funtion to func_ver.c the problem disappears...
I downloaded (and installed) the latest OS recommended patch-cluster
today, but I still have problems :(
Trond Norbye
CC=cc -v
testprog: main.o libfunc.so
$(LINK.c) -o testprog -R. -L. main.o -lfunc
libfunc.so: func.o func_ver.o
$(LINK.c) -o libfunc.so -G func.o func_ver.o
main.o: main.c
$(COMPILE.c) main.c
func.o: func.c
$(COMPILE.c) -g -KPIC func.c
func_ver.o: func_ver.c
$(COMPILE.c) -g -KPIC func_ver.c
clean:
$(RM) testprog libfunc.so main.o func.o func_ver.o
int func(int val) {
return val * 2;
}
static const char *version = "\nlibfunc.so V1.0.0\n";
extern int func(int);
int main(int argc, char **argv)
{
return func(2);
}
- Next message: Tonij: "Re: Considering cosolodation for 120+ Oracle instances"
- Previous message: Beardy: "Re: GPL'ing Solaris won't save SUN"
- Next in thread: Trond Norbye: "Re: Problem with shared library generated on Solaris 8 X86"
- Reply: Trond Norbye: "Re: Problem with shared library generated on Solaris 8 X86"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|