On 3/10/22 03:16, Janosch Frank wrote:
Allocating the header lets us write it at a later time and hence also
allows us to change section and segment table offsets until we
finally write it.

Signed-off-by: Janosch Frank <fran...@linux.ibm.com>
---
  dump/dump.c           | 115 ++++++++++++++++++++++--------------------
  include/sysemu/dump.h |   1 +
  2 files changed, 62 insertions(+), 54 deletions(-)

You're collecting the important pieces that go into the header separately (phdr_offset, phdr_num, etc), and you can certainly change those as you go along. But I don't see the point of allocating the ehdr early. I think you should create it and write it out immediately.


r~

Reply via email to