This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] binutils/readelf: Fix unwind entries of 64-bit hppa object files
- From: Helge Deller <deller at gmx dot de>
- To: Alan Modra <amodra at gmail dot com>, binutils at sourceware dot org
- Cc: John David Anglin <dave dot anglin at bell dot net>
- Date: Wed, 15 Aug 2018 09:36:39 +0200
- Subject: Re: [PATCH] binutils/readelf: Fix unwind entries of 64-bit hppa object files
- References: <20180814160329.GA21448@ls3530> <20180815002023.GP1544@bubble.grove.modra.org>
* Alan Modra <amodra@gmail.com>:
> On Tue, Aug 14, 2018 at 06:03:29PM +0200, Helge Deller wrote:
> > * readelf.c (slurp_hppa_unwind_table): Replace "eh_addr_size" with "4".
>
> hppa_process_unwind also uses eh_addr_size. Do you see the correct
> number of entries reported?
You are right. I didn't noticed, but my old patch reported a wrong
number of unwind entries.
> Rather than this patch, I suspect you should set eh_addr_size in
> process_section_headers.
Yes. The patch below fixes both issues.
Thanks!
Helge
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8a61db6459..3d239d3ab2 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -6090,6 +6090,11 @@ process_section_headers (Filedata * filedata)
break;
}
break;
+
+ case EM_PARISC:
+ /* ELF64 uses 32-bit unwind entries too. */
+ eh_addr_size = 4;
+ break;
}
#define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \