diff options
author | Alan Modra <amodra@gmail.com> | 2018-10-10 13:14:56 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-10-10 13:32:18 +1030 |
commit | 43f6cd0588a735c202934789d67b6ed4302f255d (patch) | |
tree | 386ca521a6a43d1170890db41881f756fc9a1752 /binutils/readelf.c | |
parent | 8ab159a96565be6e60f8d88ba3a4638116f7e9d3 (diff) | |
download | gdb-43f6cd0588a735c202934789d67b6ed4302f255d.zip gdb-43f6cd0588a735c202934789d67b6ed4302f255d.tar.gz gdb-43f6cd0588a735c202934789d67b6ed4302f255d.tar.bz2 |
HPPA64 .PARISC.unwind entries
.PARISC.unwind has 32-bit addresses in both 32-bit ELF and 64-bit ELF.
Well, strictly speaking, the 32-bit "start" and "end" fields are
segment relative offsets. (The 64-bit ABI says so, while the 32-bit
ABI says they are addresses but it appears they are segment relative
offsets in practice. Likely the 32-bit ABI lacks an update.)
* readelf.c (hppa_process_unwind): Don't use eh_addr_size to
calculate number of entries.
(slurp_hppa_unwind_table): Don't use eh_addr_size here either.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 2748664..41f55ee 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -8065,7 +8065,7 @@ slurp_hppa_unwind_table (Filedata * filedata, i = rp->r_offset / unw_ent_size; - switch ((rp->r_offset % unw_ent_size) / eh_addr_size) + switch ((rp->r_offset % unw_ent_size) / 4) { case 0: aux->table[i].start.section = sym->st_shndx; @@ -8133,7 +8133,7 @@ hppa_process_unwind (Filedata * filedata) { if (streq (SECTION_NAME (sec), ".PARISC.unwind")) { - unsigned long num_unwind = sec->sh_size / (2 * eh_addr_size + 8); + unsigned long num_unwind = sec->sh_size / 16; printf (ngettext ("\nUnwind section '%s' at offset 0x%lx " "contains %lu entry:\n", |