]> sourceware.org Git - glibc.git/commitdiff
Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x
authorFlorian Weimer <fweimer@redhat.com>
Thu, 31 Oct 2019 12:28:49 +0000 (13:28 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 21 Nov 2019 12:31:29 +0000 (13:31 +0100)
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

elf/dl-reloc.c
sysdeps/generic/ldsodefs.h

index 725a074a7925feea7676be2c4d4102a640bb61e1..7f201fe18454b66b773b81e9a91bf68af6fc89ae 100644 (file)
@@ -244,7 +244,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
               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)
index 891049dd1a3acc4e65db3bdd6c4680bd90b24c0f..973778013680212f90074d7efcc849bc70185b0c 100644 (file)
@@ -917,6 +917,9 @@ enum
     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.  */
This page took 0.046615 seconds and 5 git commands to generate.