changeset 227:318a9ffc2b85

- resolve_self test cleanups
author Tassilo Philipp
date Sun, 16 Apr 2017 13:29:36 +0200
parents 6e40eb9fb261
children f8a6e60598cc
files test/resolve_self/README.txt test/resolve_self/main.c
diffstat 2 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/resolve_self/README.txt	Sat Apr 15 22:02:58 2017 +0200
+++ b/test/resolve_self/README.txt	Sun Apr 16 13:29:36 2017 +0200
@@ -12,8 +12,6 @@
 self referencing is important on configurations where there is no
 shared library but everything is statically linked.
 
-
-
+Note that on some platforms, linker flags have to be used so symbol
+names are in the binary, at first hand (e.g. --export-dynamic).
 
-
-
--- a/test/resolve_self/main.c	Sat Apr 15 22:02:58 2017 +0200
+++ b/test/resolve_self/main.c	Sun Apr 16 13:29:36 2017 +0200
@@ -46,6 +46,7 @@
   void* address;
   double result;
   int status;
+  DLSyms* pSyms;
   DLLib* pLib = dlLoadLibrary(NULL);
   assert(pLib);
   printf("self loaded at %p\n", pLib);
@@ -59,6 +60,14 @@
     printf("can't resolve address of add_dd_d, it doesn't seem to be a *dynamic* symbol\n");
     status = 0;
   }
+
+  dlFreeLibrary(pLib);
+
+  /*pSyms = dlSymsInit(NULL);
+  printf("syms handle: %p\n", pSyms);
+  dlSymsCleanup(pSyms);*/
+
   printf("result: resolve_self: %d\n", status);
   return 0;
 }
+