This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Duplicate data objects in shared libraries


H.J. Lu wrote:
> Here is the simplified testcase without using weak and only 2 DSOs.
> Could someone please run it on Solaris/x86 and Solaris/Sparc?

% uname -a
SunOS mcfsrv 5.8 Generic_108528-08 sun4u sparc SUNW,Ultra-Enterprise

mcfsrv:/home/users2/nksauter/rwgk/h_j_lu_bug_2 % echo $LD_LIBRARY_PATH 
.:/home/users2/nksauter/local/gcc304/lib/gcc-lib/sparc-sun-solaris2.8/3.0.4:/home/users2/nksauter/local/gcc304/lib:/opt/SUNWspro/lib:/usr/local/pgsql/lib:/remote/mcfra_local/mysql/lib:/usr/local/lib

mcfsrv:/home/users2/nksauter/rwgk/h_j_lu_bug_2 % make
gcc --shared -o libfoo.so lib.c -fPIC -g
gcc --shared -o one.so one.c libfoo.so -fPIC -g -DMODULE1
gcc -g  -c  main.c
gcc  -o main main.o -ldl
./main
object: ff3506a0
library: ff3506a0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]