From: Andreas J. <aj...@su...> - 2002-09-09 13:06:40
|
On x86-64 (and also other archs) shared libs really need -fPIC. I've added the flag to the ldd tests so that they work again. Another problem is ld -shared. For correct setup of shared libs, you should use gcc -shared instead. Otherwise e.g. initializers will not get called correctly. Please apply these fixes, Andreas Index: testcases/commands/ade/ldd/Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/commands/ade/ldd/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- testcases/commands/ade/ldd/Makefile 6 Aug 2002 18:45:38 -0000 1.3 +++ testcases/commands/ade/ldd/Makefile 9 Sep 2002 13:04:53 -0000 @@ -1,4 +1,4 @@ -CFLAGS += -c -O +CFLAGS += -c -O -fPIC LDFLAGS += SRCS=$(wildcard *.c) Index: testcases/commands/ade/ldd/ldd01 =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/commands/ade/ldd/ldd01,v retrieving revision 1.3 diff -u -p -r1.3 ldd01 --- testcases/commands/ade/ldd/ldd01 28 Nov 2001 18:52:19 -0000 1.3 +++ testcases/commands/ade/ldd/ldd01 9 Sep 2002 12:58:15 -0000 @@ -43,11 +43,11 @@ rm -rf $TCtmp do_setup() { mkdir $TCtmp -ld -shared -o $TCtmp/lddfile1.o.so $TCdat/lddfile1.o -ld -shared -o $TCtmp/lddfile2.o.so $TCdat/lddfile2.o -ld -shared -o $TCtmp/lddfile3.o.so $TCdat/lddfile3.o -ld -shared -o $TCtmp/lddfile4.o.so $TCdat/lddfile4.o -ld -shared -o $TCtmp/lddfile5.o.so $TCdat/lddfile5.o +cc -shared -o $TCtmp/lddfile1.o.so $TCdat/lddfile1.o +cc -shared -o $TCtmp/lddfile2.o.so $TCdat/lddfile2.o +cc -shared -o $TCtmp/lddfile3.o.so $TCdat/lddfile3.o +cc -shared -o $TCtmp/lddfile4.o.so $TCdat/lddfile4.o +cc -shared -o $TCtmp/lddfile5.o.so $TCdat/lddfile5.o cc -O -o $TCtmp/a.out $TCtmp/lddfile*.o.so $TCdat/main.o } -- Andreas Jaeger SuSE Labs aj...@su... private aj...@ar... http://www.suse.de/~aj |