summaryrefslogtreecommitdiffstats
path: root/dump
diff options
context:
space:
mode:
authorJanosch Frank2022-10-17 10:38:16 +0200
committerMarc-André Lureau2022-10-24 20:30:10 +0200
commit13fd417ddc81a1685c6a8f4e1c80bbfe7150f164 (patch)
treea1ef2a0bcb23d1d8038271828152b521489ffe14 /dump
parentdump: Reorder struct DumpState (diff)
downloadqemu-13fd417ddc81a1685c6a8f4e1c80bbfe7150f164.tar.gz
qemu-13fd417ddc81a1685c6a8f4e1c80bbfe7150f164.tar.xz
qemu-13fd417ddc81a1685c6a8f4e1c80bbfe7150f164.zip
dump: Reintroduce memory_offset and section_offset
section_offset will later be used to store the offset to the section data which will be stored last. For now memory_offset is only needed to make section_offset look nicer. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20221017083822.43118-5-frankja@linux.ibm.com>
Diffstat (limited to 'dump')
-rw-r--r--dump/dump.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dump/dump.c b/dump/dump.c
index b168a25321..626f7b2fd0 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -1876,6 +1876,8 @@ static void dump_init(DumpState *s, int fd, bool has_format,
s->phdr_offset = s->shdr_offset + sizeof(Elf32_Shdr) * s->shdr_num;
s->note_offset = s->phdr_offset + sizeof(Elf32_Phdr) * s->phdr_num;
}
+ s->memory_offset = s->note_offset + s->note_size;
+ s->section_offset = s->memory_offset + s->total_size;
return;