summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-04-04 12:43:32 -0700
committerNick Kralevich <nnk@google.com>2012-04-04 12:43:32 -0700
commit8c4f3ce8d084e3949d77ad8743593b5c83c3d41c (patch)
tree4061fa7982521c070a1a9bc688ddfc279e722c08 /linker
parent3a7ea52f17b68f62fa088d57f96ff24a76f50ea2 (diff)
downloadbionic-8c4f3ce8d084e3949d77ad8743593b5c83c3d41c.zip
bionic-8c4f3ce8d084e3949d77ad8743593b5c83c3d41c.tar.gz
bionic-8c4f3ce8d084e3949d77ad8743593b5c83c3d41c.tar.bz2
linker: surround "debug_verbosity" by "#if LINKER_DEBUG"
Avoid executing useless code when we're not compiled with debugging support. Change-Id: Iea1821b241acacdf65d1a91d743356058dfef273
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/linker/linker.c b/linker/linker.c
index 3a923c1..9805b35 100644
--- a/linker/linker.c
+++ b/linker/linker.c
@@ -108,7 +108,10 @@ static const char *ldpreload_names[LDPRELOAD_MAX + 1];
static soinfo *preloads[LDPRELOAD_MAX + 1];
+#if LINKER_DEBUG
int debug_verbosity;
+#endif
+
static int pid;
/* This boolean is set if the program being loaded is setuid */
@@ -2120,10 +2123,12 @@ sanitize:
/* Get a few environment variables */
{
+#if LINKER_DEBUG
const char* env;
env = linker_env_get("DEBUG"); /* XXX: TODO: Change to LD_DEBUG */
if (env)
debug_verbosity = atoi(env);
+#endif
/* Normally, these are cleaned by linker_env_secure, but the test
* against program_is_setuid doesn't cost us anything */