mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: dfi_elf: refactor nt_* functions
The functions are refactored so the `struct zg_fh` value is now passed as argument to the `nt_*` functions instead of accessing the global variable `g.fh` from within of the functions. This makes the functions reusable and easier to test. While at it, improve the documentation of `nt_read`. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
922d29ee49
commit
4e6d43e2ac
@@ -156,6 +156,16 @@ int read_elf_hdr(const struct zg_fh *fh, Elf64_Ehdr *ehdr);
|
||||
Elf64_Phdr *read_elf_phdrs(const struct zg_fh *fh, const Elf64_Ehdr *ehdr,
|
||||
unsigned int *phdr_count);
|
||||
|
||||
/*
|
||||
* Read note and store the note description in @buf
|
||||
*/
|
||||
int nt_read(const struct zg_fh *fh, const Elf64_Nhdr *note, void *buf, size_t buf_len);
|
||||
|
||||
/*
|
||||
* Skip note
|
||||
*/
|
||||
void nt_skip(const struct zg_fh *fh, const Elf64_Nhdr *note);
|
||||
|
||||
/*
|
||||
* Initialize ELF note
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user