diff options
author | Domen Kožar <domen@dev.si> | 2020-06-03 14:01:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 14:01:03 (GMT) |
commit | 640a35faaa9ec36cdc502126dddd8837c8a6e1f2 (patch) | |
tree | 5bff5586e2b04b8e7b90d6c281a1ed6b20d04486 /src | |
parent | 6dfc3c20a9788e9f6897a56d0f64377ce9fb87be (diff) | |
parent | ad5f1f078b716802dfb8f7226cb1d5c720348a78 (diff) | |
download | patchelf-640a35faaa9ec36cdc502126dddd8837c8a6e1f2.zip patchelf-640a35faaa9ec36cdc502126dddd8837c8a6e1f2.tar.gz patchelf-640a35faaa9ec36cdc502126dddd8837c8a6e1f2.tar.bz2 |
Merge pull request #202 from rpurdie/master
Fix shared library corruption when rerunning patchelf
Diffstat (limited to 'src')
-rw-r--r-- | src/patchelf.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index cbf420d..f3b8a45 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -752,6 +752,7 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary() } /* Add a segment that maps the replaced sections into memory. */ + wri(hdr->e_phoff, sizeof(Elf_Ehdr)); phdrs.resize(rdi(hdr->e_phnum) + 1); wri(hdr->e_phnum, rdi(hdr->e_phnum) + 1); Elf_Phdr & phdr = phdrs[rdi(hdr->e_phnum) - 1]; |