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
1 changed files with 2 additions and 2 deletions

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
features will be disabled later if they are not enabled in
executable. */
if (l == &GL(dl_rtld_map)
|| l->l_real == &GL(dl_rtld_map)
if (is_rtld_link_map (l)
|| is_rtld_link_map (l->l_real)
|| (info->program != NULL && l == m))
continue;
#endif