Skip to content

Commit

Permalink
Merge pull request #156 from cuviper/ppc64-rel-type
Browse files Browse the repository at this point in the history
symtabAPI: use the known type for new relocations
  • Loading branch information
wrwilliams committed Aug 18, 2016
2 parents 6e1b36f + 8339602 commit d0b2355
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions symtabAPI/src/emitElf.C
Original file line number Diff line number Diff line change
Expand Up @@ -2121,10 +2121,10 @@ void emitElf<ElfTypes>::createRelocationSections(std::vector<relocationEntry> &r
rels[j].r_offset = newRels[i].rel_addr() + library_adjust;
if (dynSymNameMapping.find(newRels[i].name()) != dynSymNameMapping.end()) {
rels[j].r_info = ElfTypes::makeRelocInfo(dynSymNameMapping[newRels[i].name()],
relocationEntry::getGlobalRelType(obj->getAddressWidth()));
newRels[i].getRelType());
} else {
rels[j].r_info = ElfTypes::makeRelocInfo((unsigned long) (STN_UNDEF),
relocationEntry::getGlobalRelType(obj->getAddressWidth()));
newRels[i].getRelType());
}
j++;
l++;
Expand All @@ -2134,10 +2134,10 @@ void emitElf<ElfTypes>::createRelocationSections(std::vector<relocationEntry> &r
//if( relas[k].r_addend ) relas[k].r_addend += library_adjust;
if (dynSymNameMapping.find(newRels[i].name()) != dynSymNameMapping.end()) {
relas[k].r_info = ElfTypes::makeRelocInfo(dynSymNameMapping[newRels[i].name()],
relocationEntry::getGlobalRelType(obj->getAddressWidth()));
newRels[i].getRelType());
} else {
relas[k].r_info = ElfTypes::makeRelocInfo((unsigned long) (STN_UNDEF),
relocationEntry::getGlobalRelType(obj->getAddressWidth()));
newRels[i].getRelType());
}
k++;
m++;
Expand Down

0 comments on commit d0b2355

Please sign in to comment.