aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-04-29 14:21:50 +0000
committerAlan Modra <amodra@gmail.com>2009-04-29 14:21:50 +0000
commitc6a0c689463b80b39682bd4d0ffa19452eebb1fd (patch)
tree14650e48ed69495ab0e8362f70646e7f49f8f371
parent59cdf8427011bbf8a562fbb419923a5af28d52b4 (diff)
downloadgdb-c6a0c689463b80b39682bd4d0ffa19452eebb1fd.zip
gdb-c6a0c689463b80b39682bd4d0ffa19452eebb1fd.tar.gz
gdb-c6a0c689463b80b39682bd4d0ffa19452eebb1fd.tar.bz2
* readelf.c (slurp_ia64_unwind_table): Correct 64-bit unwind table
read, and merge with 32-bit case.
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c17
2 files changed, 10 insertions, 13 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 2988c45..60c7f8a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-29 Alan Modra <amodra@bigpond.net.au>
+ Denis Scherbakov <denis_scherbakov@yahoo.com>
+
+ * readelf.c (slurp_ia64_unwind_table): Correct 64-bit unwind table
+ read, and merge with 32-bit case.
+
2009-04-27 Anthony Green <green@moxielogic.com>
* NEWS: Mention verilog support added to bfd.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d1dea7b..a7e7b05 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4975,23 +4975,14 @@ slurp_ia64_unwind_table (FILE * file,
aux->table = xcmalloc (size / (3 * eh_addr_size), sizeof (aux->table[0]));
tep = aux->table;
- for (tp = table; tp < table + size; tp += 3 * eh_addr_size, ++tep)
+ for (tp = table; tp < table + size; ++tep)
{
tep->start.section = SHN_UNDEF;
tep->end.section = SHN_UNDEF;
tep->info.section = SHN_UNDEF;
- if (is_32bit_elf)
- {
- tep->start.offset = byte_get ((unsigned char *) tp + 0, 4);
- tep->end.offset = byte_get ((unsigned char *) tp + 4, 4);
- tep->info.offset = byte_get ((unsigned char *) tp + 8, 4);
- }
- else
- {
- tep->start.offset = BYTE_GET ((unsigned char *) tp + 0);
- tep->end.offset = BYTE_GET ((unsigned char *) tp + 8);
- tep->info.offset = BYTE_GET ((unsigned char *) tp + 16);
- }
+ tep->start.offset = byte_get (tp, eh_addr_size); tp += eh_addr_size;
+ tep->end.offset = byte_get (tp, eh_addr_size); tp += eh_addr_size;
+ tep->info.offset = byte_get (tp, eh_addr_size); tp += eh_addr_size;
tep->start.offset += aux->seg_base;
tep->end.offset += aux->seg_base;
tep->info.offset += aux->seg_base;