This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[pushed] Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x
- From: "Sourceware to Gerrit sync (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Cc: Carlos O'Donell <carlos at redhat dot com>
- Date: Thu, 21 Nov 2019 07:40:21 -0500
- Subject: [pushed] Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x
- Auto-submitted: auto-generated
- References: <gerrit.1572549639000.Ic7b94a3f7c4719a00ca8e6018088567824da0658@gnutoolchain-gerrit.osci.io>
- Reply-to: noreply at gnutoolchain-gerrit dot osci dot io, fweimer at redhat dot com, libc-alpha at sourceware dot org, carlos at redhat dot com
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/470
......................................................................
Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x
This will allow changes in dependency processing during non-lazy
binding, for more precise processing of NODELETE objects: During
initial relocation in dlopen, the fate of NODELETE objects is still
unclear, so objects which are depended upon by NODELETE objects
cannot immediately be marked as NODELETE.
Change-Id: Ic7b94a3f7c4719a00ca8e6018088567824da0658
---
M elf/dl-reloc.c
M sysdeps/generic/ldsodefs.h
2 files changed, 5 insertions(+), 1 deletion(-)
Approvals:
Carlos O'Donell: Looks good to me, approved
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 725a074..7f201fe 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -244,7 +244,8 @@
v = (version); \
_lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \
scope, v, _tc, \
- DL_LOOKUP_ADD_DEPENDENCY, NULL); \
+ DL_LOOKUP_ADD_DEPENDENCY \
+ | DL_LOOKUP_FOR_RELOCATE, NULL); \
l->l_lookup_cache.ret = (*ref); \
l->l_lookup_cache.value = _lr; })) \
: l)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 891049d..9737780 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -917,6 +917,9 @@
DL_LOOKUP_RETURN_NEWEST = 2,
/* Set if dl_lookup* called with GSCOPE lock held. */
DL_LOOKUP_GSCOPE_LOCK = 4,
+ /* Set if dl_lookup is called for non-lazy relocation processing
+ from _dl_relocate_object in elf/dl-reloc.c. */
+ DL_LOOKUP_FOR_RELOCATE = 8,
};
/* Lookup versioned symbol. */
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: Ic7b94a3f7c4719a00ca8e6018088567824da0658
Gerrit-Change-Number: 470
Gerrit-PatchSet: 4
Gerrit-Owner: Florian Weimer <fweimer@redhat.com>
Gerrit-Reviewer: Carlos O'Donell <carlos@redhat.com>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-MessageType: merged