summaryrefslogtreecommitdiffstats
path: root/libdwfl/argp-std.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-08-24 21:12:15 +0000
committerRoland McGrath <[email protected]>2005-08-24 21:12:15 +0000
commit80e43a769057f807f859264a55c77edad4f2f6ad (patch)
tree5507f6ddd397927c9b559c3989ee50d31bf00124 /libdwfl/argp-std.c
parentf81343a6ed3066a9d466f4551b6355d2a5411927 (diff)
2005-08-24 Roland McGrath <[email protected]>
* argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function, magic initializer to set -heur-stack-bound option.
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