summaryrefslogtreecommitdiffstats
path: root/include/sysemu
diff options
context:
space:
mode:
authorJanosch Frank2022-10-17 13:32:10 +0200
committerMarc-André Lureau2022-10-24 20:30:10 +0200
commit9b72224f44612ddd5b434a1bccf79346946d11da (patch)
treefa41daa7c83b85a4fb7cb4d77de35215c2c181a1 /include/sysemu
parentdump: Reintroduce memory_offset and section_offset (diff)
downloadqemu-9b72224f44612ddd5b434a1bccf79346946d11da.tar.gz
qemu-9b72224f44612ddd5b434a1bccf79346946d11da.tar.xz
qemu-9b72224f44612ddd5b434a1bccf79346946d11da.zip
dump: Add architecture section and section string table support
Add hooks which architectures can use to add arbitrary data to custom sections. Also add a section name string table in order to identify section contents Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20221017113210.41674-1-frankja@linux.ibm.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/dump-arch.h3
-rw-r--r--include/sysemu/dump.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/sysemu/dump-arch.h b/include/sysemu/dump-arch.h
index e25b02e990..59bbc9be38 100644
--- a/include/sysemu/dump-arch.h
+++ b/include/sysemu/dump-arch.h
@@ -21,6 +21,9 @@ typedef struct ArchDumpInfo {
uint32_t page_size; /* The target's page size. If it's variable and
* unknown, then this should be the maximum. */
uint64_t phys_base; /* The target's physmem base. */
+ void (*arch_sections_add_fn)(DumpState *s);
+ uint64_t (*arch_sections_write_hdr_fn)(DumpState *s, uint8_t *buff);
+ int (*arch_sections_write_fn)(DumpState *s, uint8_t *buff);
} ArchDumpInfo;
struct GuestPhysBlockList; /* memory_mapping.h */
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index 9ed811b313..38ccac7190 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -180,6 +180,9 @@ typedef struct DumpState {
hwaddr note_offset;
void *elf_section_hdrs; /* Pointer to section header buffer */
+ void *elf_section_data; /* Pointer to section data buffer */
+ uint64_t elf_section_data_size; /* Size of section data */
+ GArray *string_table_buf; /* String table data buffer */
uint8_t *note_buf; /* buffer for notes */
size_t note_buf_offset; /* the writing place in note_buf */