From 805d2e7d47affd899bd5103049fd154a0b2302c7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 15 Aug 2000 08:23:49 +0000 Subject: Update. * elf/constload1.c: Call mtrace. Check return value of dlclose call. * elf/constload2.c: Add destructor to unload constload3. --- elf/constload1.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'elf/constload1.c') diff --git a/elf/constload1.c b/elf/constload1.c index 1435284c62..4640b774cb 100644 --- a/elf/constload1.c +++ b/elf/constload1.c @@ -1,6 +1,7 @@ #include #include #include +#include #include int @@ -10,11 +11,17 @@ main (void) void *h; int ret; + mtrace (); + h = dlopen ("constload2.so", RTLD_LAZY | RTLD_GLOBAL); if (h == NULL) error (EXIT_FAILURE, errno, "cannot load module \"constload2.so\""); foo = dlsym (h, "foo"); ret = foo (); - dlclose (h); + if (dlclose (h) != 0) + { + puts ("failed to close"); + exit (EXIT_FAILURE); + } return ret; } -- cgit v1.2.3