[PATCH v5 02/22] elf: Add audit tests for modules with TLSDESC
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Nov 11 19:18:33 GMT 2021
On 10/11/2021 10:55, Florian Weimer wrote:
> * Adhemerval Zanella:
>
>> diff --git a/elf/Makefile b/elf/Makefile
>> index bad18f2d11..bd1a0f79b4 100644
>> --- a/elf/Makefile
>> +++ b/elf/Makefile
>> @@ -384,6 +384,20 @@ modules-names += tst-gnu2-tls1mod
>> $(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
>> tst-gnu2-tls1mod.so-no-z-defs = yes
>> CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2
>> +
>> +tests += tst-audit-tlsdesc tst-audit-tlsdesc-dlopen
>> +modules-names += tst-auditmod-tlsdesc1 tst-auditmod-tlsdesc2 tst-audit-tlsdesc-audit
>> +$(objpfx)tst-audit-tlsdesc: $(objpfx)tst-auditmod-tlsdesc1.so \
>> + $(objpfx)tst-auditmod-tlsdesc2.so \
>> + $(shared-thread-library)
>> +CFLAGS-tst-auditmod-tlsdesc1.c += -mtls-dialect=gnu2
>> +CFLAGS-tst-auditmod-tlsdesc2.c += -mtls-dialect=gnu2
>
> Do we need to check have-mtls-dialect-gnu2 here?
It already does (line 387 above).
>
>> diff --git a/elf/tst-audit-tlsdesc-audit.c b/elf/tst-audit-tlsdesc-audit.c
>> new file mode 100644
>> index 0000000000..53993830c9
>> --- /dev/null
>> +++ b/elf/tst-audit-tlsdesc-audit.c
>
>> +unsigned int
>> +la_version (unsigned int version)
>> +{
>> + return version;
>> +}
>
> Why not LAV_CURRENT? We should lead by good example.
Ack.
More information about the Libc-alpha
mailing list