[llvm] [llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments. (PR #165278)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 17 00:48:05 PST 2026


================
@@ -0,0 +1,64 @@
+## Show that llvm-readelf can handle an input file with many segments.
+# RUN: yaml2obj %s -o %t
+# RUN: llvm-readobj --file-headers --sections --segments %t | FileCheck %s
----------------
jh7370 wrote:

But the contents of shdr 0 drives the interpretation of phnum, not the other way around, so testing the section header content doesn't give us anything.

Indeed, you don't even check the contents of the section header in any meaningful way...

https://github.com/llvm/llvm-project/pull/165278


More information about the llvm-commits mailing list