When reading the phdrs data from the core file check if we got everything,
or just part of the data.
https://sourceware.org/bugzilla/show_bug.cgi?id=24387
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2019-03-27 Mark Wielaard <mark@klomp.org>
+
+ * dwfl_segment_report_module.c (dwfl_segment_report_module): Check
+ ph_buffer_size vs xlatefrom.d_size after read_portion call.
+
2019-02-24 Mark Wielaard <mark@klomp.org>
* linux-kernel-modules.c (intuit_kernel_bounds): Init *notes before
start + phoff, xlatefrom.d_size))
return finish ();
+ /* ph_buffer_size will be zero if we got everything from the initial
+ buffer, otherwise it will be the size of the new buffer that
+ could be read. */
+ if (ph_buffer_size != 0)
+ xlatefrom.d_size = ph_buffer_size;
+
xlatefrom.d_buf = ph_buffer;
bool class32 = ei_class == ELFCLASS32;