| Summary: | Thread local storage miscompiles | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Łukasz Michalik <lpmichalik> |
| Component: | Hardened | Assignee: | The Gentoo Linux Hardened Team <hardened> |
| Status: | RESOLVED OBSOLETE | ||
| Severity: | major | CC: | gibgibon |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | minimal testcase | ||
|
Description
Łukasz Michalik
2010-06-30 08:39:51 UTC
Created attachment 237007 [details]
minimal testcase
The only change we have done it in the TLS code so it behave as the gcc 3.4.6 did else you may get soemthing like this /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.3/../../../../x86_64-pc-linux-gnu/bin/ld: ../../lib/libuuid.a(gen_uuid.o): relocation R_X86_64_TPOFF32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC ../../lib/libuuid.a: could not read symbols: Bad value see more in http://bugs.gentoo.org/show_bug.cgi?id=232601 http://gcc.gnu.org/ml/gcc-patches/2005-03/msg00923.html The code change @@ -5607,7 +5607,11 @@ bool is_local; is_local = targetm.binds_local_p (decl); - if (!flag_shlib) + #ifdef ENABLE_ESP + if (!flag_pic) + #else + if (!flag_shlib) + #endif { if (is_local) kind = TLS_MODEL_LOCAL_EXEC; |