aboutsummaryrefslogtreecommitdiff
path: root/elf/reldep7.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
committerZack Weinberg <zackw@panix.com>2017-06-08 15:39:03 -0400
commit5046dbb4a7eba5eccfd258f92f4735c9ffc8d069 (patch)
tree4470480d904b65cf14ca524f96f79eca818c3eaf /elf/reldep7.c
parent199fc19d3aaaf57944ef036e15904febe877fc93 (diff)
downloadglibc-zack/build-layout-experiment.tar
glibc-zack/build-layout-experiment.tar.gz
glibc-zack/build-layout-experiment.tar.bz2
glibc-zack/build-layout-experiment.zip
Prepare for radical source tree reorganization.zack/build-layout-experiment
All top-level files and directories are moved into a temporary storage directory, REORG.TODO, except for files that will certainly still exist in their current form at top level when we're done (COPYING, COPYING.LIB, LICENSES, NEWS, README), all old ChangeLog files (which are moved to the new directory OldChangeLogs, instead), and the generated file INSTALL (which is just deleted; in the new order, there will be no generated files checked into version control).
Diffstat (limited to 'elf/reldep7.c')
-rw-r--r--elf/reldep7.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/elf/reldep7.c b/elf/reldep7.c
deleted file mode 100644
index 5275a0e8f1..0000000000
--- a/elf/reldep7.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#include <dlfcn.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main (void)
-{
- void *h1;
- void *h2;
- void *mod1_bar, *mod2_bar;
-
- h1 = dlopen ("reldep7mod1.so", RTLD_GLOBAL | RTLD_LAZY);
- if (h1 == NULL)
- {
- printf ("cannot open reldep7mod1.so: %s\n", dlerror ());
- exit (1);
- }
-
- h2 = dlopen ("reldep7mod2.so", RTLD_GLOBAL | RTLD_LAZY);
- if (h2 == NULL)
- {
- printf ("cannot open reldep7mod1.so: %s\n", dlerror ());
- exit (1);
- }
-
- mod1_bar = dlsym (h1, "mod1_bar");
- if (mod1_bar == NULL)
- {
- printf ("cannot get address of \"mod1_bar\": %s\n", dlerror ());
- exit (1);
- }
-
- mod2_bar = dlsym (h2, "mod2_bar");
- if (mod2_bar == NULL)
- {
- printf ("cannot get address of \"mod2_bar\": %s\n", dlerror ());
- exit (1);
- }
-
- printf ("%d\n", ((int (*) (void)) mod1_bar) ());
- printf ("%d\n", ((int (*) (void)) mod2_bar) ());
-
- if (dlclose (h1) != 0)
- {
- printf ("closing h1 failed: %s\n", dlerror ());
- exit (1);
- }
-
- printf ("%d\n", ((int (*) (void)) mod2_bar) ());
-
- if (dlclose (h2) != 0)
- {
- printf ("closing h2 failed: %s\n", dlerror ());
- exit (1);
- }
-
- return 0;
-}