summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/include/dl-defs.h6
-rw-r--r--ldso/libdl/libdl.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h
index 2c4402929..21b9c28f0 100644
--- a/ldso/include/dl-defs.h
+++ b/ldso/include/dl-defs.h
@@ -202,10 +202,10 @@ typedef struct {
# define DL_MALLOC_ALIGN (__WORDSIZE / 8)
#endif
-#ifdef __UCLIBC_NO_UNDERSCORES__
-#define __C_SYMBOL_PREFIX__ ""
+#ifdef __UCLIBC_UNDERSCORES__
+# define __C_SYMBOL_PREFIX__ "_"
#else
-#define __C_SYMBOL_PREFIX__ "_"
+# define __C_SYMBOL_PREFIX__ ""
#endif
/* Define this if you want to modify the VALUE returned by
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index d21f8a6fd..4538d91e7 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -447,7 +447,7 @@ void *dlsym(void *vhandle, const char *name)
struct dyn_elf *rpnt;
void *ret;
/* Nastiness to support underscore prefixes. */
-#ifndef __UCLIBC_NO_UNDERSCORES__
+#ifdef __UCLIBC_UNDERSCORES__
char tmp_buf[80];
char *name2 = tmp_buf;
size_t nlen = strlen (name) + 1;
@@ -508,7 +508,7 @@ void *dlsym(void *vhandle, const char *name)
if (!ret)
_dl_error_number = LD_NO_SYMBOL;
out:
-#ifndef __UCLIBC_NO_UNDERSCORES__
+#ifdef __UCLIBC_UNDERSCORES__
if (name2 != tmp_buf)
free (name2);
#endif