This is the mail archive of the
mailing list for the GCC project.
how to disable stack protector per function?
- From: Stas Sergeev <stsp at list dot ru>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 29 Mar 2015 23:25:36 +0300
- Subject: how to disable stack protector per function?
- Authentication-results: sourceware.org; auth=none
Some functions in my program change FS and GS registers.
I always used __attribute__((no_instrument_function)) for such
functions, and that worked for years.
But now there is a stack protector prolog and epilog that
are not being disabled by this attribute. Since they use FS and
GS, they crash my program.
I myself can compile my program with stack protector disabled,
but all modern distributions enable stack protector, so is there
any way to disable it per function?