[committed] Don't relocate parisc unwind addresses twice in readelf

View: New views
1 Messages — Rating Filter:   Alert me  

[committed] Don't relocate parisc unwind addresses twice in readelf

by John David Anglin-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The attached patch fixes another problem noticed trying to debug
out of order unwind entries in the parisc linux kernel.  readelf -u
when applied to a .o file would display twice the expected values
for the start and end offsets of a function.

Tested on hppa-unknown-linux-gnu.  Committed to trunk.

Dave
--
J. David Anglin                                  dave.anglin@...
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2009-11-08  John David Anglin  <dave.anglin@...>

        * readelf.c (slurp_hppa_unwind_table): Don't relocate address twice.

Index: readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.467
diff -u -3 -p -r1.467 readelf.c
--- readelf.c 23 Oct 2009 00:15:07 -0000 1.467
+++ readelf.c 29 Oct 2009 20:59:26 -0000
@@ -5589,11 +5589,11 @@ slurp_hppa_unwind_table (FILE * file,
     {
     case 0:
       aux->table[i].start.section = sym->st_shndx;
-      aux->table[i].start.offset += sym->st_value + rp->r_addend;
+      aux->table[i].start.offset  = sym->st_value + rp->r_addend;
       break;
     case 1:
       aux->table[i].end.section   = sym->st_shndx;
-      aux->table[i].end.offset   += sym->st_value + rp->r_addend;
+      aux->table[i].end.offset    = sym->st_value + rp->r_addend;
       break;
     default:
       break;