mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: dfo_elf: replace HDR_PER_CPU_SIZE with get_max_note_size_per_cpu
The maximum size of all supported ELF note entries for a CPU can be 0x4a4 bytes and not 0x4a0. Use a function for the calculation so it's easier to maintain. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
d712806b39
commit
dc87aef335
@@ -79,6 +79,9 @@
|
||||
#define NOTE_NAME_VMCOREINFO "VMCOREINFO"
|
||||
|
||||
#define ELF_NOTE_ROUNDUP(size) ROUNDUP(size, 4)
|
||||
#define ELF_NOTE_NAME_SIZE(name) ELF_NOTE_ROUNDUP(name ? strlen(name) + 1 : 0)
|
||||
#define ELF64_NOTE_SIZE(name, desc_size) \
|
||||
(sizeof(Elf64_Nhdr) + ELF_NOTE_NAME_SIZE(name) + ELF_NOTE_ROUNDUP(desc_size))
|
||||
|
||||
/*
|
||||
* prstatus ELF Note
|
||||
@@ -266,4 +269,6 @@ void *nt_prpsinfo(void *ptr);
|
||||
*/
|
||||
void *nt_vmcoreinfo(void *ptr, const char *vmcoreinfo);
|
||||
|
||||
size_t get_max_note_size_per_cpu(void);
|
||||
|
||||
#endif /* DF_ELF_H */
|
||||
|
||||
Reference in New Issue
Block a user