--- dietlibc/dietfeatures.h 2005/05/07 23:08:59 1.60 +++ dietlibc/dietfeatures.h 2006/04/04 05:35:14 1.61 @@ -101,7 +101,33 @@ * `main' can not be found. */ /* #define WANT_STACKGAP */ +/* Include support for ProPolice/SSP, calls guard_setup */ +/* ProPolice is part of gcc 4.1 and up, there were patches for earlier + * versions. To make use of this, compile your application with + * -fstack-protector. On i386, enabling this option with + * WANT_SSP_URANDOM and then not using -fstack-protector enlarges a + * binary by 152 bytes. */ +#if (__GNUC__>4) || ((__GNUC__==4) && (__GNUC_MINOR__>=1)) +#define WANT_SSP +#endif +/* Choose which canary seeder you want you can choose + * both but it will check urandom first and use xor as + * a fallback. xor is lighter but weaker */ +#define WANT_SSP_URANDOM +/* The XOR seeder is completely predictable and should not be used + * unless you don't have a /dev/urandom, and even then it's a bad idea. */ +/* #define WANT_SSP_XOR */ + + + + /* stop uncommenting here ;-) */ +#if defined(WANT_SSP) || defined(WANT_STACKGAP) +#define CALL_IN_STARTCODE stackgap +#else +#define CALL_IN_STARTCODE main +#endif + #ifndef WANT_FASTER_STRING_ROUTINES #define WANT_SMALL_STRING_ROUTINES #endif