From 3d91edb219b3970ccbc9dd53e24536b25fb41edf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 20 Jan 1999 00:34:52 +0000 Subject: Update. 1999-01-20 Ulrich Drepper * elf/Makefile (tests): Add preloadtest. Add rules to build more test modules and the preloadtest binary. * elf/loadtest.c (TEST_ROUNDS): Increase to 1000. (testobjs): Add more modules. (tests): Add entries for new modules. * elf/preloadtest.c: New file. Test for LD_PRELOAD. * elf/testobj1.c: Add 'preload' function. * elf/testobj2.c: Likewise. * elf/testobj3.c: Likewise. * elf/testobj4.c: New file. * elf/testobj5.c: New file. * elf/testobj6.c: New file. --- elf/Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'elf/Makefile') diff --git a/elf/Makefile b/elf/Makefile index f6da5c47a0..c46c22933b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -75,7 +75,7 @@ others += ldconfig install-rootsbin += ldconfig endif -tests = loadtest restest1 +tests = loadtest restest1 preloadtest include ../Rules @@ -214,14 +214,20 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \ $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so) endef -modules-names = testobj1 testobj2 testobj3 testobj1_1 +modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ + testobj1_1 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names))) generated += $(test-modules) +LDLIBS-testobj1.so = -ldl $(objpfx)testobj1_1.so: $(objpfx)testobj1.so LDLIBS-testobj1_1.so = $(objpfx)testobj1.so $(objpfx)testobj2.so: $(objpfx)testobj1.so -LDLIBS-testobj2.so = $(objpfx)testobj1.so +LDLIBS-testobj2.so = $(objpfx)testobj1.so -ldl +LDLIBS-testobj3.so = -ldl +LDLIBS-testobj4.so = -ldl +LDLIBS-testobj5.so = -ldl +LDLIBS-testobj6.so = -ldl $(test-modules): $(objpfx)%.so: %.c $(build-module) @@ -235,6 +241,10 @@ $(objpfx)restest1: $(objpfx)libdl.so LDFLAGS-restest1 = -rdynamic $(objpfx)testobj1.so $(objpfx)testobj1_1.so $(objpfx)restest1.out: $(test-modules) + +$(objpfx)preloadtest.out: $(test-modules) +LDFLAGS-preloadtest = -rdynamic $(objpfx)testobj6.so +preloadtest-ENV = LD_PRELOAD=testobj1.so:testobj2.so:testobj3.so:testobj4.so:testobj5.so # muwahaha -- cgit v1.2.3