From 70b504a538a28806b350b2f30df5263a55ade5cd Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 25 Apr 2001 23:36:24 +0000 Subject: Be really sneaky and use GNU ld special stuff so that whenever folks use the unsafe gets, they will get a warning from the linker. muahahaha. This method will soon be applied to fork() w/o an mmu etc... -Erik --- include/features.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/features.h b/include/features.h index 475d62a85..880cd36ef 100644 --- a/include/features.h +++ b/include/features.h @@ -90,5 +90,16 @@ #include #undef __need_uClibc_config_h + +#if 1 /* This only works with GNU ld, but that is what we use 'round these parts */ +#define link_warning(symbol, msg) \ +asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \ +static const char __evoke_link_warning_##symbol[] \ +__attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg; +#else +# define link_warning(symbol, msg) +#endif + + #endif -- cgit v1.2.3