From f78ceb56774f28d3652535153f0d54f37be3ded8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 26 Aug 2010 08:55:28 +0000 Subject: * Update DT_RELA. --- src/patchelf.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/patchelf.cc b/src/patchelf.cc index ccd27ff..09a52fe 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -774,7 +774,8 @@ void ElfFile::rewriteHeaders(Elf_Addr phdrAddress) if (!shdr) error("cannot find .rel.dyn or .rel.got"); dyn->d_un.d_ptr = shdr->sh_addr; } - /* should probably update DT_RELA */ + else if (d_tag == DT_RELA) + dyn->d_un.d_ptr = findSection(".rela.dyn").sh_addr; /* PPC Linux */ else if (d_tag == DT_VERNEED) dyn->d_un.d_ptr = findSection(".gnu.version_r").sh_addr; else if (d_tag == DT_VERSYM) -- cgit v0.12