[RFC makedumpfile: add userinfo elf section 3/4] elf_info: make int note_descsz() and offset_next_note() public

Ivan Khoronzhuk ivan.khoronzhuk at gmail.com
Wed Dec 1 05:47:29 PST 2021


These usefule funcgtions are supposed to be reused in makedumfile note
travese procedures.

Signed-off-by: Ivan Khoronzhuk <ikhoronz at cisco.com>
---
 elf_info.c | 4 ++--
 elf_info.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/elf_info.c b/elf_info.c
index bc24083..0737b6c 100644
--- a/elf_info.c
+++ b/elf_info.c
@@ -181,7 +181,7 @@ dump_Elf_load(Elf64_Phdr *prog, int num_load)
 	return TRUE;
 }
 
-static off_t
+off_t
 offset_next_note(void *note)
 {
 	off_t offset;
@@ -240,7 +240,7 @@ note_namesz(void *note)
 	return size;
 }
 
-static int
+int
 note_descsz(void *note)
 {
 	int size;
diff --git a/elf_info.h b/elf_info.h
index ca96935..f38605d 100644
--- a/elf_info.h
+++ b/elf_info.h
@@ -74,6 +74,8 @@ int get_nr_cpus(void);
 int has_pt_note(void);
 void set_pt_note(off_t offset, unsigned long size);
 void get_pt_note(off_t *offset, unsigned long *size);
+int note_descsz(void *note);
+off_t offset_next_note(void *note);
 
 int has_vmcoreinfo(void);
 void set_vmcoreinfo(off_t offset, unsigned long size);
-- 
2.20.1




More information about the kexec mailing list