first attempt at enabling stack protector support
the code is written to pre-init the thread pointer in static linked programs that pull in __stack_chk_fail or dynamic-linked programs that lookup the symbol. no explicit canary is set; the canary will be whatever happens to be in the thread structure at the offset gcc hard-coded. this can be improved later.
This commit is contained in:
1 parent
848d30a1e5
commit
60872cf9c9
3 files changed
+28
No files matched your search
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
#include "pthread_impl.h"
|
||||
#include "atomic.h"
|
||||
|
||||
void __init_ssp(void)
|
||||
{
|
||||
#ifndef __PIC__
|
||||
__pthread_self_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void __stack_chk_fail(void)
|
||||
{
|
||||
a_crash();
|
||||
}
|
||||
Reference in new issue
Block a user