summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorKurt Miller <kurt@cvs.openbsd.org>2005-09-28 14:57:11 +0000
committerKurt Miller <kurt@cvs.openbsd.org>2005-09-28 14:57:11 +0000
commitc789ed1e019df1c5377da80bee29a077369ca513 (patch)
tree1bff39288865f9a27803b435c12dd96124d14882 /regress
parent5dbec3ac375be16536002d6758d34d60443d8430 (diff)
make sure dlsym(RTLD_DEFAULT,...) can see symbols in own object group
Diffstat (limited to 'regress')
-rw-r--r--regress/libexec/ld.so/dlsym/test2/libbb/bb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/regress/libexec/ld.so/dlsym/test2/libbb/bb.c b/regress/libexec/ld.so/dlsym/test2/libbb/bb.c
index 0c316ddb984..fa2005332fa 100644
--- a/regress/libexec/ld.so/dlsym/test2/libbb/bb.c
+++ b/regress/libexec/ld.so/dlsym/test2/libbb/bb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bb.c,v 1.2 2005/09/16 23:30:25 kurt Exp $ */
+/* $OpenBSD: bb.c,v 1.3 2005/09/28 14:57:10 kurt Exp $ */
/*
* Copyright (c) 2005 Kurt Miller <kurt@openbsd.org>
@@ -39,6 +39,12 @@ bbTest1(void *libbb)
ret = 1;
}
+ /* check RTLD_DEFAULT can see symbols in the libbb object group */
+ if (dlsym(RTLD_DEFAULT, "bbSymbol") == NULL) {
+ printf("dlsym(RTLD_DEFAULT, \"bbSymbol\") == NULL\n");
+ ret = 1;
+ }
+
/* check RTLD_SELF can *not* see symbols in main object group */
if (dlsym(RTLD_SELF, "aaSymbol") != NULL) {
printf("dlsym(RTLD_SELF, \"aaSymbol\") != NULL\n");