Message ID | 20210209171839.7911-9-vivek@collabora.com |
---|---|
State | New |
Headers | show |
Series | Implementation of RTLD_SHARED for dlmopen | expand |
On 09/02/2021 14:18, Vivek Das Mohapatra via Libc-alpha wrote: > The libc_already_loaded check normally considers the libc_map entry > in GL(dl_ns)[args->nsid].libc_map. > > This is not correct for proxies, which use the libc_map from > the default namespace (as proxies are dummy entries that point > to the base namespace via their l_real members). > --- > elf/dl-open.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/elf/dl-open.c b/elf/dl-open.c > index dc4b386559..096aa4c680 100644 > --- a/elf/dl-open.c > +++ b/elf/dl-open.c > @@ -568,6 +568,7 @@ dl_open_worker (void *a) > { > proxy_ns = args->nsid; > args->nsid = LM_ID_BASE; > + args->libc_already_loaded = GL(dl_ns)[LM_ID_BASE].libc_map != NULL; > } > > /* It was already open. */ > Ok.
diff --git a/elf/dl-open.c b/elf/dl-open.c index dc4b386559..096aa4c680 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -568,6 +568,7 @@ dl_open_worker (void *a) { proxy_ns = args->nsid; args->nsid = LM_ID_BASE; + args->libc_already_loaded = GL(dl_ns)[LM_ID_BASE].libc_map != NULL; } /* It was already open. */