Andreas Schwab
e85cac7c02
- dont-remove-nodelete-flag.patch: Don't remove DF_1_NODELETE flag from all loaded objects on failed dlopen - openat64-readd-o-largefile.patch: Readd O_LARGEFILE flag for openat64 OBS-URL: https://build.opensuse.org/request/show/321588 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=413
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
Index: glibc-2.22/elf/dl-close.c
|
|
===================================================================
|
|
--- glibc-2.22.orig/elf/dl-close.c
|
|
+++ glibc-2.22/elf/dl-close.c
|
|
@@ -144,6 +144,14 @@ _dl_close_worker (struct link_map *map,
|
|
char done[nloaded];
|
|
struct link_map *maps[nloaded];
|
|
|
|
+ /* Clear DF_1_NODELETE to force object deletion. We don't need to touch
|
|
+ l_tls_dtor_count because forced object deletion only happens when an
|
|
+ error occurs during object load. Destructor registration for TLS
|
|
+ non-POD objects should not have happened till then for this
|
|
+ object. */
|
|
+ if (force)
|
|
+ map->l_flags_1 &= ~DF_1_NODELETE;
|
|
+
|
|
/* Run over the list and assign indexes to the link maps and enter
|
|
them into the MAPS array. */
|
|
int idx = 0;
|
|
@@ -152,14 +160,6 @@ _dl_close_worker (struct link_map *map,
|
|
l->l_idx = idx;
|
|
maps[idx] = l;
|
|
++idx;
|
|
-
|
|
- /* Clear DF_1_NODELETE to force object deletion. We don't need to touch
|
|
- l_tls_dtor_count because forced object deletion only happens when an
|
|
- error occurs during object load. Destructor registration for TLS
|
|
- non-POD objects should not have happened till then for this
|
|
- object. */
|
|
- if (force)
|
|
- l->l_flags_1 &= ~DF_1_NODELETE;
|
|
}
|
|
assert (idx == nloaded);
|
|
|