[all-commits] [llvm/llvm-project] ee9ffc: [obj2yaml] - Dump the `EShNum` key in some cases.
    Georgii Rymar via All-commits 
    all-commits at lists.llvm.org
       
    Fri Nov 27 05:03:09 PST 2020
    
    
  
  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ee9ffc73452a0b500db18d422562918d389b1d14
      https://github.com/llvm/llvm-project/commit/ee9ffc73452a0b500db18d422562918d389b1d14
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-11-27 (Fri, 27 Nov 2020)
  Changed paths:
    A llvm/test/tools/obj2yaml/ELF/eshnum.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp
  Log Message:
  -----------
  [obj2yaml] - Dump the `EShNum` key in some cases.
This patch starts emitting the `EShNum` key, when the `e_shnum = 0`
and the section header table exists.
`e_shnum` might be 0, when the the number of entries in the section header
table is larger than or equal to SHN_LORESERVE (0xff00).
In this case the real number of entries
in the section header table is held in the `sh_size`
member of the initial entry in section header table.
Currently, obj2yaml crashes when an object has `e_shoff != 0` and the `sh_size`
member of the initial entry in section header table is `0`.
This patch fixes it.
Differential revision: https://reviews.llvm.org/D92098
    
    
More information about the All-commits
mailing list