- Applies tls-exec generally, on FreeBSD despite enabling it in Msan, the TLS part does not execute.
- Suppress PIE which does not go together with PIC in FreeBSD (linkage issue when trying to compile code with msan flag).
Details
- Reviewers
vitalybuka krytarowski eugenis emaste dim
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
As discussed here https://reviews.llvm.org/D43080 this is the specific change into Msan cmake configuration part.
What is the problem with -fPIE? Is it not supported to link PIE and PIC objects in one binary?
What kind of linkage issue?
I mean, in my view of the world, it is completely fine to build a static library with -fPIE and then link it to an executable. I'd like to understand what is wrong with that on FreeBSD.
Naively looking at https://hardenedbsd.org/content/easy-feature-comparison PIE on FreeBSD might need more work.
This is the error I get with both PIE and PIC
... relocation R_X86_64_TPOFF32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
OK, sure, as long as it's under if(FreeBSD).
Does it mean you are building MSan runtime as not position-independent code (i.e. not PIE nor PIC)? It would be suitable for non-PIE executables only.
Hmm, this already landed as a part of D43080
I've added this -ftls flag as a separate commit SVN r. 326649