]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: Ignore GCS property of ld.so
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Wed, 10 Jan 2024 16:20:24 +0000 (16:20 +0000)
committerYury Khrustalev <yury.khrustalev@arm.com>
Mon, 14 Oct 2024 12:16:03 +0000 (13:16 +0100)
check_gcs is called for each dependency of a DSO, but the GNU property
of the ld.so is not processed so ldso->l_mach.gcs may not be correct.
Just assume ld.so is GCS compatible independently of the ELF marking.

sysdeps/aarch64/dl-gcs.c

index 764b8a56e954b696126687749ef3755187434659..b81aa30787159e5c10fa9505df5c0b023b4d627d 100644 (file)
@@ -32,6 +32,11 @@ fail (struct link_map *l, const char *program)
 static void
 check_gcs (struct link_map *l, const char *program)
 {
+#ifdef SHARED
+  /* Ignore GCS marking on ld.so: its properties are not processed.  */
+  if (l->l_real == &GL(dl_rtld_map))
+    return;
+#endif
   if (!l->l_mach.gcs)
     {
       if (GLRO(dl_aarch64_gcs_policy) == 2 || !program)