From 19cf43bed69d9952c39391f42f22114afb3a0d3f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 17 Mar 2000 02:17:59 +0000 Subject: Update. 2000-03-16 Ulrich Drepper * elf/Makefile: Add rules to compile and rune constload1 test. * elf/constload1.c: New file. * elf/constload2.c: New file. * elf/constload3.c: New file. --- elf/constload1.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 elf/constload1.c (limited to 'elf/constload1.c') diff --git a/elf/constload1.c b/elf/constload1.c new file mode 100644 index 0000000000..1435284c62 --- /dev/null +++ b/elf/constload1.c @@ -0,0 +1,20 @@ +#include +#include +#include +#include + +int +main (void) +{ + int (*foo) (void); + void *h; + int ret; + + 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); + return ret; +} -- cgit v1.2.3