This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: readelf: fix relocation of ia64 unwind table


Hi,

ia64 rela relocations are not in place and therefore the value must be directly stored (instead of being added) to the data.

This was working on gas generated object files as the original data was always 0.  But it breaks on object files
generated by the ia64 VMS compilers.

Ok to commit ?

Tristan.

binutils/
2010-06-10  Tristan Gingold  <gingold@adacore.com>

	* readelf.c (slurp_ia64_unwind_table): IA64 rela relocations are
	not inplace.



diff --git a/binutils/readelf.c b/binutils/readelf.c
index 2aded24..8db72fa 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -5623,15 +5623,15 @@ slurp_ia64_unwind_table (FILE * file,
            {
            case 0:
              aux->table[i].start.section = sym->st_shndx;
-             aux->table[i].start.offset += rp->r_addend + sym->st_value;
+             aux->table[i].start.offset  = rp->r_addend + sym->st_value;
              break;
            case 1:
              aux->table[i].end.section   = sym->st_shndx;
-             aux->table[i].end.offset   += rp->r_addend + sym->st_value;
+             aux->table[i].end.offset    = rp->r_addend + sym->st_value;
              break;
            case 2:
              aux->table[i].info.section  = sym->st_shndx;
-             aux->table[i].info.offset  += rp->r_addend + sym->st_value;
+             aux->table[i].info.offset   = rp->r_addend + sym->st_value;
              break;
            default:
              break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]