[PATCH v6 02/14] aarch64: configure test for BTI support

Adhemerval Zanella adhemerval.zanella@linaro.org
Mon Jul 6 18:12:32 GMT 2020



On 06/07/2020 15:07, Szabolcs Nagy wrote:
> The 07/06/2020 11:11, Adhemerval Zanella via Libc-alpha wrote:
>>
>>
>> On 01/07/2020 11:38, Szabolcs Nagy wrote:
>>> Check BTI support in the compiler and linker.  The check also
>>> requires READELF that understands the BTI GNU property note.
>>> It is expected to succeed with gcc >=gcc-9 configured with
>>> --enable-standard-branch-protection and binutils >=binutils-2.33.
>>>
>>> Note: passing -mbranch-protection=bti in CFLAGS when building glibc
>>> may not be enough to get a glibc that supports BTI because crtbegin*
>>> and crtend* provided by the compiler needs to be BTI compatible too.
>>
>> If I read correctly this scenario should be covered by the configure
>> test, right?
> 
> it is not covered because the config checks use -nostdlib
> and -nostartfiles (otherwise objects from the libc that
> the toolchain uses would leak into the checks).
> 
> so if gcc startfiles are not bti compatible then configure
> succeeds (but later on there will be link failures so the
> build fails).

Right, would be hard to try to fail early on configure for this
case?


More information about the Libc-alpha mailing list