Skip to content

Commit f78ceb5

Browse files
committed
* Update DT_RELA.
1 parent 396955b commit f78ceb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/patchelf.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,8 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress)
774774
if (!shdr) error("cannot find .rel.dyn or .rel.got");
775775
dyn->d_un.d_ptr = shdr->sh_addr;
776776
}
777-
/* should probably update DT_RELA */
777+
else if (d_tag == DT_RELA)
778+
dyn->d_un.d_ptr = findSection(".rela.dyn").sh_addr; /* PPC Linux */
778779
else if (d_tag == DT_VERNEED)
779780
dyn->d_un.d_ptr = findSection(".gnu.version_r").sh_addr;
780781
else if (d_tag == DT_VERSYM)

0 commit comments

Comments
 (0)