[PATCH] elf: Remove _dl_process_pt_note

H.J. Lu hjl.tools@gmail.com
Fri Apr 10 04:18:51 GMT 2026


_dl_map_object_from_fd and rtld_setup_main_map have

  for (ph = &l->l_phdr[l->l_phnum]; ph != l->l_phdr; --ph)
    switch (ph[-1].p_type)
      {
      case PT_NOTE:
        _dl_process_pt_note (l, fd, &ph[-1]);
        break;
      case PT_GNU_PROPERTY:
        _dl_process_pt_gnu_property (l, fd, &ph[-1]);
        break;
      }

_dl_process_pt_note is empty, except for sysdeps/x86/dl-prop.h:

static inline void __attribute__ ((unused))
_dl_process_pt_note (struct link_map *l, int fd, const ElfW(Phdr) *ph)
{
  const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr);
  _dl_process_property_note (l, note, ph->p_memsz, ph->p_align);
}

Since all current CET enabled binaries have PT_GNU_PROPERTY, we can drop
_dl_process_pt_note.  This fixes BZ #34064.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Remove-_dl_process_pt_note.patch
Type: text/x-patch
Size: 4754 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260410/54ec2f3f/attachment.bin>


More information about the Libc-alpha mailing list