Fix elf: Introduce is_rtld_link_map [BZ #32488]

Also use is_rtld_link_map in dl-cet.c.  This fixes BZ #32488.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
H.J. Lu 2024-12-21 04:21:55 +08:00
parent c3ee510267
commit 40bf25b754

View file

@ -77,8 +77,8 @@ dl_check_legacy_object (struct link_map *m,
/* Skip check for ld.so since it has the features enabled. The /* Skip check for ld.so since it has the features enabled. The
features will be disabled later if they are not enabled in features will be disabled later if they are not enabled in
executable. */ executable. */
if (l == &GL(dl_rtld_map) if (is_rtld_link_map (l)
|| l->l_real == &GL(dl_rtld_map) || is_rtld_link_map (l->l_real)
|| (info->program != NULL && l == m)) || (info->program != NULL && l == m))
continue; continue;
#endif #endif