[lld] [llvm] [Object][ELF] Support extended header for Object Parser in ELF (PR #162288)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 03:30:19 PDT 2025


================
@@ -556,7 +556,7 @@ Sections:
 # RUN: yaml2obj --docnum=25 %s -o %t25
 # RUN: not llvm-readobj -h %t25 2>&1 | FileCheck -DFILE=%t25 --check-prefix=INVALID-SEC-NUM1 %s
 
-# INVALID-SEC-NUM1: error: '[[FILE]]': unable to continue dumping, the file is corrupt: invalid section header table offset (e_shoff = 0x58) or invalid number of sections specified in the first section header's sh_size field (0x3ffffffffffffff)
+# INVALID-SEC-NUM1: error: '[[FILE]]': invalid section header table offset (e_shoff = 0x58) or invalid number of sections specified in the first section header's sh_size field (0x3ffffffffffffff)
----------------
aokblast wrote:

Emm, I am a little bit uncertain about this. Now, the ELFFile::section() error can be detected in the initialization step of ELFFile since we actually read it. Therefore, it makes some error happen early like this case. Should we ignore silently in construction? Or should we report it right away?

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


More information about the llvm-commits mailing list