From 1949de15f099f04be574805cc9506f08146cad67 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 10 Oct 2005 18:42:11 +0000 Subject: 2005-10-10 H.J. Lu PR binutils/1436 * readelf.c (ABSADDR): New. (dump_ia64_unwind): Use ABSADDR to get the unwind info address. --- binutils/ChangeLog | 6 ++++++ binutils/readelf.c | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 47a74c2..fd20dd3 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2005-10-10 H.J. Lu + + PR binutils/1436 + * readelf.c (ABSADDR): New. + (dump_ia64_unwind): Use ABSADDR to get the unwind info address. + 2005-10-10 Thomas Weidenmueller * resbin.c (res_to_bin_accelerator): Place the terminating NUL at diff --git a/binutils/readelf.c b/binutils/readelf.c index 04e69d6..d076a65 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4580,6 +4580,11 @@ struct absaddr bfd_vma offset; }; +#define ABSADDR(a) \ + ((a).section \ + ? section_headers [(a).section].sh_addr + (a).offset \ + : (a).offset) + struct ia64_unw_aux_info { struct ia64_unw_table_entry @@ -4672,7 +4677,7 @@ dump_ia64_unwind (struct ia64_unw_aux_info *aux) printf ("], info at +0x%lx\n", (unsigned long) (tp->info.offset - aux->seg_base)); - head = aux->info + (tp->info.offset - aux->info_addr); + head = aux->info + (ABSADDR (tp->info) - aux->info_addr); stamp = byte_get ((unsigned char *) head, sizeof (stamp)); printf (" v%u, flags=0x%lx (%s%s), len=%lu bytes\n", -- cgit v1.1