Proposal: Deprecate static dlopen

Message ID a17d9928-f6a7-0b17-726d-10381478e713@redhat.com
State Committed
Headers

Commit Message

Florian Weimer Dec. 22, 2017, 1:05 p.m. UTC
  See this thread for some background:

   https://sourceware.org/ml/libc-alpha/2017-12/msg00521.html

The only useful application for dlopen is access to NSS functionality 
because static dlopen binaries are more tightly tied to a specific glibc 
version than dynamically linked binaries.  If we provide NSS access 
through a helper program (e.g., a special mode of getent), then the need 
for dlopen goes away, and static linking even becomes more usable.

Thanks,
Florian
  

Comments

Carlos O'Donell Dec. 22, 2017, 6:54 p.m. UTC | #1
On 12/22/2017 05:05 AM, Florian Weimer wrote:
> See this thread for some background:
> 
>   https://sourceware.org/ml/libc-alpha/2017-12/msg00521.html
> 
> The only useful application for dlopen is access to NSS functionality because static dlopen binaries are more tightly tied to a specific glibc version than dynamically linked binaries.  If we provide NSS access through a helper program (e.g., a special mode of getent), then the need for dlopen goes away, and static linking even becomes more usable.

This works for me.

It's good to start setting expectations early.

Mixing static and dynamic linking has caused us nothing but problems.
  
Adhemerval Zanella Netto Dec. 22, 2017, 7:39 p.m. UTC | #2
On 22/12/2017 16:54, Carlos O'Donell wrote:
> On 12/22/2017 05:05 AM, Florian Weimer wrote:
>> See this thread for some background:
>>
>>   https://sourceware.org/ml/libc-alpha/2017-12/msg00521.html
>>
>> The only useful application for dlopen is access to NSS functionality because static dlopen binaries are more tightly tied to a specific glibc version than dynamically linked binaries.  If we provide NSS access through a helper program (e.g., a special mode of getent), then the need for dlopen goes away, and static linking even becomes more usable.
> 
> This works for me.
> 
> It's good to start setting expectations early.
> 
> Mixing static and dynamic linking has caused us nothing but problems.
> 

I agreed with this as well.
  

Patch

commit f70309a186e5ab045c9808ff10ca9ba5eb9f6b58
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Dec 22 14:03:00 2017 +0100

    NEWS: Deprecate static dlopen

diff --git a/NEWS b/NEWS
index 0a162f6643..d8e4c890c3 100644
--- a/NEWS
+++ b/NEWS
@@ -71,6 +71,10 @@  Major new features:
 
 Deprecated and removed features, and other changes affecting compatibility:
 
+* Support for statically linked applications which call dlopen is deprecated
+  and will be removed in a future version of glibc.  Applications which call
+  dlopen need to be linked dynamically instead.
+
 * Support for old programs which use internal stdio data structures and
   functions is deprecated.  This includes programs which use the C++ streams
   provided by libstdc++ in GCC 2.95.  Programs which use the internal