[PATCH] binutils/readelf: Fix unwind entries of 64-bit hppa object files
Helge Deller
deller@gmx.de
Tue Aug 14 16:03:00 GMT 2018
readelf shows wrong unwind entries when run against a 64-bit hppa2.0
object file (32-bit hppa1.1 object file is OK). This is fixed by
replacing eh_addr_size by the constant 4 in slurp_hppa_unwind_table()
which refers to the number of 32-bit values and not to the size of an
address.
If ok, can someone please commit?
Thanks,
Helge
binutils/
* readelf.c (slurp_hppa_unwind_table): Replace "eh_addr_size" with "4".
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8a61db6459..97a491801c 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -8049,7 +8049,9 @@ slurp_hppa_unwind_table (Filedata * filedata,
i = rp->r_offset / unw_ent_size;
- switch ((rp->r_offset % unw_ent_size) / eh_addr_size)
+ /* On 32- and 64-bit object files, each unwind entry consists of four
+ 32-bit values (start, end, 2 x flags). */
+ switch ((rp->r_offset % unw_ent_size) / 4)
{
case 0:
aux->table[i].start.section = sym->st_shndx;
More information about the Binutils
mailing list