[glibc] elf/tst-dlopenfail: Disable --no-as-needed for tst-dlopenfailmod1.so
Carlos O'Donell
codonell@redhat.com
Mon Dec 2 22:01:00 GMT 2019
On 12/2/19 2:45 PM, Dmitry V. Levin wrote:
> On Mon, Dec 02, 2019 at 08:33:32PM +0100, Florian Weimer wrote:
>> * Dmitry V. Levin:
>>
>>> On Mon, Dec 02, 2019 at 01:54:56PM -0000, Florian Weimer wrote:
>>>> https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=61a7c9df71ee4e6f94b56c20f0d37c6e17d5f284
>>>>
>>>> commit 61a7c9df71ee4e6f94b56c20f0d37c6e17d5f284
>>>> Author: Florian Weimer <fweimer@redhat.com>
>>>> Date: Mon Dec 2 14:53:16 2019 +0100
>>>>
>>>> elf/tst-dlopenfail: Disable --no-as-needed for tst-dlopenfailmod1.so
>>>
>>> Dis you mean "Disable --as-needed"?
>>
>> Yes, sorry about that. It's too late now.
>>
>>>> diff --git a/elf/Makefile b/elf/Makefile
>>>> index 305bed2..f7adebe 100644
>>>> --- a/elf/Makefile
>>>> +++ b/elf/Makefile
>>>> @@ -1602,8 +1602,11 @@ LDFLAGS-tst-finilazyfailmod.so = \
>>>> $(objpfx)tst-dlopenfail: $(libdl)
>>>> $(objpfx)tst-dlopenfail.out: \
>>>> $(objpfx)tst-dlopenfailmod1.so $(objpfx)tst-dlopenfailmod2.so
>>>> -# Order matters here. tst-dlopenfaillinkmod.so's soname ensures
>>>> -# a run-time loader failure.
>>>> +# Order matters here. tst-dlopenfaillinkmod.so's soname ensures a
>>>> +# run-time loader failure. --as-needed breaks this test because
>>>> +# nothing actually references tst-dlopenfailmod2.so (with its soname
>>>> +# tst-dlopenfail-missingmod.so).
>>>> +LDFLAGS-tst-dlopenfailmod1.so = -Wl,--no-as-needed
>>>
>>> The rest of this file uses $(no-as-needed), shouldn't it be used here as well?
>>
>> Is the macro really necessary? It's not even much shorter, and it makes
>> you wonder what is going on.
>
> According to commit glibc-2.12~14, it used to be necessary for
> portability. Starting with commit glibc-2.16~556, the portability
> is no longer an issue for -Wl,--no-as-needed.
>
> Anyway, it would nice for consistency purposes to either use
> $(no-as-needed) or remove it altogether.
Agreed.
--
Cheers,
Carlos.
More information about the Libc-alpha
mailing list