[cfe-users] Using -fsanitize=safe-stack compiler/linker flag

Sam Elliott via cfe-users cfe-users at lists.llvm.org
Thu Jul 6 13:23:46 PDT 2017


If you built clang yourself, you'll need compiler-rt to link against. If you installed clang through a package manager check that compiler-rt is part of the package you obtained.

Sam

> On 26 Jun 2017, at 3:06 pm, Alex Chen via cfe-users <cfe-users at lists.llvm.org> wrote:
> 
> I am using clang 3.8.0 and gcc 6.2.1 on CentOS 7.3.  Everything works fine until I add ‘-fsanitize=safe-stack’ to the compiler and linker flags.
> The shared libraries are built fine but executables linking with these libraries cannot be generated due to a unresolved symbol __safestack_unsaft_stack_ptr. 
> Is this because that symbol is only available in Clang’s libc++ runtime library but not in gcc’s libstdc++?
>  
>  
> Alex Chen
>  
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org <mailto:cfe-users at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users>

--
Archibald Sam Elliott
ashe2 at cs.washington.edu
PhD Student, PLSE Group

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-users/attachments/20170706/57ac5b84/attachment.html>


More information about the cfe-users mailing list