diff options
Diffstat (limited to 'src/patchelf.cc')
-rw-r--r-- | src/patchelf.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index a4591f1..2c6bec7 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -846,6 +846,10 @@ void ElfFile<ElfFileParamNames>::rewriteHeaders(Elf_Addr phdrAddress) unsigned int newIndex = findSection3(section); // inefficient //debug("rewriting symbol %d: index = %d (%s) -> %d\n", entry, shndx, section.c_str(), newIndex); wri(sym->st_shndx, newIndex); + /* Rewrite st_value. FIXME: we should do this for all + types, but most don't actually change. */ + if (ELF32_ST_TYPE(rdi(sym->st_info)) == STT_SECTION) + wri(sym->st_value, rdi(shdrs[newIndex].sh_addr)); } } } |