[PATCH v2] Fix elf: Introduce is_rtld_link_map [BZ #32488]

H.J. Lu hjl.tools@gmail.com
Fri Dec 20 20:39:34 GMT 2024


On Sat, Dec 21, 2024 at 4:31 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > diff --git a/sysdeps/x86_64/dl-cet.c b/sysdeps/x86_64/dl-cet.c
> > index 1297c09f84..e66c1a23b2 100644
> > --- a/sysdeps/x86_64/dl-cet.c
> > +++ b/sysdeps/x86_64/dl-cet.c
> > @@ -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 (l == &_dl_rtld_map
> > +          || l->l_real == &_dl_rtld_map
> >            || (info->program != NULL && l == m))
> >           continue;
> >  #endif
>
> Please use is_rtld_link_map.  It's not an important difference here
> because the condition is under SHARED, but it helps with transitioning
> to RELRO link maps.
>

Done.

I am testing this and will check it in after testing.

Also use is_rtld_link_map in dl-cet.c.  This fixes BZ #32488.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-elf-Introduce-is_rtld_link_map-BZ-32488.patch
Type: text/x-patch
Size: 1030 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20241221/0611ae61/attachment.bin>


More information about the Libc-alpha mailing list