summaryrefslogtreecommitdiffstats
path: root/matrace.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-09-21 00:03:29 +0200
committerLennart Poettering <lennart@poettering.net>2009-09-21 00:03:29 +0200
commitb8bf385f0849ef02b6e95d562f3abf056f32d45a (patch)
tree22a154154574ae1402106c0fff037eaa80c03de1 /matrace.c
parent2c534d50ae0d9d7ba0619ff8af90d4d269175ea3 (diff)
warn if applications have been built without -rdynamic
Diffstat (limited to 'matrace.c')
-rw-r--r--matrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/matrace.c b/matrace.c
index e2183a2..741b305 100644
--- a/matrace.c
+++ b/matrace.c
@@ -167,6 +167,12 @@ static void setup(void) {
if (LIKELY(initialized))
return;
+ if (!dlsym(NULL, "main"))
+ fprintf(stderr,
+ "mutrace: Application appears to be compiled without -rdynamic. It might be a\n"
+ "mutrace: good idea to recompile with -rdynamic enabled since this produces more\n"
+ "mutrace: useful stack traces.\n\n");
+
if (__malloc_hook) {
fprintf(stderr,
"matrace: Detected non-glibc memory allocator. Your program uses some\n"