When printing the GNU DebugFission location entries we want to print the
start idx as begin, if we cannot find the address index.
A copy/paste error set up end instead of begin in that case causing us
to print garbage (in the unlikely event the .debug_addr table wasn't
found for this entry).
Signed-off-by: Mark Wielaard <mark@klomp.org>
2018-06-05 Mark Wielaard <mark@klomp.org>
+ * readelf.c (print_debug_loc_section): Set begin to idx when failing
+ to read the start address if DW_LLE_GNU_start_end_entry.
+
+2018-06-05 Mark Wielaard <mark@klomp.org>
+
* readelf.c (handle_sysv_hash): Don't leak lengths array when
detecting an invalid chain.
(handle_sysv_hash64): Likewise.
goto invalid_data;
get_uleb128 (idx, locp, locendp);
if (get_indexed_addr (cu, idx, &begin) != 0)
- end = idx; /* ... */
+ begin = idx; /* ... */
if (locp >= locendp)
goto invalid_data;
get_uleb128 (idx, locp, locendp);