[prev in list] [next in list] [prev in thread] [next in thread] 

List:       musl
Subject:    Re: [musl] [PATCH] Add support for LLVM's Control Flow Integrity (V2)
From:       Charlotte Delenk <darkkirb () darkkirb ! de>
Date:       2020-12-29 10:20:41
Message-ID: 104266ac-6da3-0fac-2394-54dca6675270 () darkkirb ! de
[Download RAW message or body]

On 12/28/20 6:01 PM, Shiz wrote:
> Hi,
>
> It seems to me guarding all of those with #ifdef __clang__ is not the optimal approach.
> What if another compilers decides to pick up the spec, or an older non-CFI
> Clang is used to compile? I think it's more logical to check the no_sanitize attribute
> with a functional test (like __has_attribute),
As Rich Felker wrote in an email i haven't yet received in my mailbox, 
he thinks it's better to put the exceptions in the Makefile. I'm going 
to update the patch accordingly (and split in two, one for GCC and LLVM 
LTO fixes and one for CFI)
> and to just apply the used attribute unconditionally.
The used attribute is a workaround for a LLVM bug that has existed for 
quite some time. GCC does not have a problem with the functions marked 
used, but instead requires _dlstart_c to be marked as such.
>
> - Shiz
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic