Glibc 2.12 issue

Mark Mitchell mark at codesourcery.com
Wed Sep 1 22:23:20 BST 2010


On 9/1/2010 2:10 PM, Michael Hope wrote:

>  3. Should libgcc be built without -fstack-protector?

To put it more strongly, I believe that libgcc should not be built with
-fstack-protector.

I don't think there's any reason to expect that all code in libgcc would
continue to work with stack-protection checks inserted (e.g., low-level
primitives for thread safety or exception-handling, where chaos may
ensue if a fault occurs in the midst of the stack-protection code).
Furthermore, those checks will increase overhead for all users of the
library.  And, if libgcc has dependencies on other shared libraries,
that could potentially break binary compatibility across Linux
distributions.

If someone wants to build libgcc with -fstack-protector, that would
require an assessment of all code in libgcc to make sure that is safe.
libgcc is emphatically not "application" code.

-- 
Mark Mitchell
CodeSourcery
mark at codesourcery.com
(650) 331-3385 x713



More information about the linaro-toolchain mailing list