summaryrefslogtreecommitdiffstats
path: root/libdwfl/argp-std.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdwfl/argp-std.c')
-rw-r--r--libdwfl/argp-std.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c
index 75f8b99f..4a6e1607 100644
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
@@ -196,3 +196,15 @@ dwfl_standard_argp (void)
{
return &libdwfl_argp;
}
+
+#ifdef _MUDFLAP
+/* In the absence of a mudflap wrapper for argp_parse, or a libc compiled
+ with -fmudflap, we'll see spurious errors for using the struct argp_state
+ on argp_parse's stack. */
+
+void __attribute__ ((constructor))
+__libdwfl_argp_mudflap_options (void)
+{
+ __mf_set_options ("-heur-stack-bound");
+}
+#endif