]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: Use l_searchlist.r_list for bti
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Thu, 28 Dec 2023 18:31:32 +0000 (18:31 +0000)
committerYury Khrustalev <yury.khrustalev@arm.com>
Mon, 20 Jan 2025 09:31:47 +0000 (09:31 +0000)
Allows using the same function for static exe.

Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
sysdeps/aarch64/dl-bti.c

index 196a0439299992698a91009d55b5f89b1593ed1a..de6130470ed0b2c211104e6734cec719b43f2309 100644 (file)
@@ -84,10 +84,9 @@ _dl_bti_check (struct link_map *l, const char *program)
   if (l->l_mach.bti_fail)
     bti_failed (l, program);
 
-  unsigned int i = l->l_searchlist.r_nlist;
-  while (i-- > 0)
+  for (unsigned int i = 0; i < l->l_searchlist.r_nlist; i++)
     {
-      struct link_map *dep = l->l_initfini[i];
+      struct link_map *dep = l->l_searchlist.r_list[i];
       if (dep->l_mach.bti_fail)
        bti_failed (dep, program);
     }