about summary refs log tree commit diff
path: root/dlfcn
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-23 04:01:56 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-23 04:01:56 +0000
commit131fd00f9e6ccf306ee3a8ce081f7fe03bb85c6e (patch)
tree2a70935953d705d81ff691c5760eeec7b81ffda2 /dlfcn
parent319a82b036811f23f0c6327def1d1716c2c9c95c (diff)
downloadglibc-131fd00f9e6ccf306ee3a8ce081f7fe03bb85c6e.tar.gz
glibc-131fd00f9e6ccf306ee3a8ce081f7fe03bb85c6e.tar.xz
glibc-131fd00f9e6ccf306ee3a8ce081f7fe03bb85c6e.zip
(do_test): Get address of ref1 using DL_LOOKUP_ADDRESS.
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/tst-dladdr.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dlfcn/tst-dladdr.c b/dlfcn/tst-dladdr.c
index d6ad97c339..35f40700f6 100644
--- a/dlfcn/tst-dladdr.c
+++ b/dlfcn/tst-dladdr.c
@@ -1,5 +1,5 @@
 /* Test for dladdr.
-   Copyright (C) 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Volkmar Sieh <vs@caldera.de> and Andreas Jaeger <aj@suse.de>.
 
@@ -25,6 +25,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <ldsodefs.h>
+
 
 #define TEST_FUNCTION do_test ()
 extern int do_test (void);
@@ -52,7 +54,8 @@ do_test (void)
   if (ret == 0)
     error (EXIT_FAILURE, 0, "dladdr failed");
 
-  printf ("address of ref1 = %p\n", sym);
+  printf ("address of ref1 = %lx\n",
+	  (unsigned long int)  DL_LOOKUP_ADDRESS (sym));
   printf ("ret = %d\n", ret);
   printf ("info.dli_fname = %p (\"%s\")\n", info.dli_fname, info.dli_fname);
   printf ("info.dli_fbase = %p\n", info.dli_fbase);