diff options
author | Kazuhito Hagio <k-hagio@ab.jp.nec.com> | 2019-11-08 22:36:26 +0000 |
---|---|---|
committer | Kazuhito Hagio <k-hagio@ab.jp.nec.com> | 2019-11-13 12:51:05 -0500 |
commit | 82e6cce2219a8fe32d34a50b7e0d3dd620d739f1 (patch) | |
tree | 92923db27981de6cb138fea41aa3f74009907775 /print_info.h | |
parent | 44dc8919f28ca9c49483c0f49bdde769aa67bc58 (diff) |
[PATCH] Add support for ELF extended numbering
In ELF dump mode, since makedumpfile cannot handle more than PN_XNUM
(0xFFFF) program headers, if a resulting dumpfile needs such a number
of program headers, it creates a broken ELF dumpfile like this:
# crash vmlinux dump.elf
...
WARNING: possibly corrupt Elf64_Nhdr: n_namesz: 4185522176 n_descsz: 3 n_type: f4000
...
WARNING: cannot read linux_banner string
crash: vmlinux and dump.elf do not match!
With this patch, if the actual number of program headers is PN_XNUM
or more, the e_phnum field of the ELF header is set to PN_XNUM, and
the actual number is set in the sh_info field of the section header
at index 0.
The section header is written just after the program headers, although
this order is not typical, for the sake of code simplisity.
Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
Diffstat (limited to 'print_info.h')
0 files changed, 0 insertions, 0 deletions