[all-commits] [llvm/llvm-project] 2ccfc5: [Object, ELF] Implement PN_XNUM extension for progr...

aokblast via All-commits all-commits at lists.llvm.org
Fri Oct 31 02:18:50 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ccfc5176dd84942841dd2a41d2064906d6d0010
      https://github.com/llvm/llvm-project/commit/2ccfc5176dd84942841dd2a41d2064906d6d0010
  Author: aokblast <aokblast at FreeBSD.org>
  Date:   2025-10-31 (Fri, 31 Oct 2025)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/ELF.h
    M llvm/include/llvm/Object/ELF.h

  Log Message:
  -----------
  [Object,ELF] Implement PN_XNUM extension for program headers (#162288)

In ELF file, there is a possible extended header for those phnum, shnum,
and shstrndx larger than the maximum of 16 bits. This extended header
use section 0 to record these fields in 32 bits. 

We implment this feature so that programs rely on
ELFFile::program_headers() can get the
correct number of segments. Also, the consumers don't have to check the
section 0 themselve, insteead, they can use the getPhNum() as an
alternative.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list