On 13/02/2018 13:13, Szabolcs Nagy wrote:
> On 07/02/18 18:07, Adhemerval Zanella wrote:
> 5. The TCB support on GLIBC is meant to be included in version 2.28.
>>
> ...
>> +/* -fsplit-stack uses a TCB field available on glibc-2.27. GLIBC also
>> + exports symbol, __tcb_private_ss, to signal it has the field available
>> + on TCB bloc. This aims to prevent binaries linked against newer
>> + GLIBC to run on non-supported ones. */
>
>
> i suspect this needs to be updated since the glibc patch
> is not committed yet.
>
> (i'll review the glibc patch, if it looks ok then it can
> be committed after the gcc side is accepted.)
I fixed the commit message locally, thanks for checking on this.
>
>> +
>> +static bool
>> +aarch64_supports_split_stack (bool report ATTRIBUTE_UNUSED,
>> + struct gcc_options *opts ATTRIBUTE_UNUSED)
>> +{
>> +#ifndef TARGET_GLIBC_MAJOR
>> +#define TARGET_GLIBC_MAJOR 0
>> +#endif
>> +#ifndef TARGET_GLIBC_MINOR
>> +#define TARGET_GLIBC_MINOR 0
>> +#endif
>> + /* Note: Can't test DEFAULT_ABI here, it isn't set until later. */
>> + if (TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2026)
>> + return true;
>> +
>> + if (report)
>> + error ("%<-fsplit-stack%> currently only supported on AArch64 GNU/Linux
>> with glibc-2.27 or later");
>> + return false;
>> +}
>> +
>> +#undef TARGET_SUPPORTS_SPLIT_STACK
>> +#define TARGET_SUPPORTS_SPLIT_STACK aarch64_supports_split_stack
>> +