[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
Loading
Please register or sign in to comment