summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-03 11:24:31 (GMT)
committerEelco Dolstra <edolstra@gmail.com>2017-05-03 11:24:31 (GMT)
commit2a9cefd7d637d160d12dc7946393778fa8abbc58 (patch)
treeda56edc8b14c7cad78200913d5c3d6c2394c4d9f /src
parent6bfcafbba8d89e44f9ac9582493b4f27d9d8c369 (diff)
downloadpatchelf-2a9cefd7d637d160d12dc7946393778fa8abbc58.zip
patchelf-2a9cefd7d637d160d12dc7946393778fa8abbc58.tar.gz
patchelf-2a9cefd7d637d160d12dc7946393778fa8abbc58.tar.bz2
Fix multiple --add-needed
Reported by Jannis Harder.
Diffstat (limited to 'src')
-rw-r--r--src/patchelf.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index f3c1b84..55b38e3 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -1464,6 +1464,7 @@ void ElfFile<ElfFileParamNames>::addNeeded(const std::set<std::string> & libs)
wri(newDyn.d_tag, DT_NEEDED);
wri(newDyn.d_un.d_val, j);
setSubstr(newDynamic, i * sizeof(Elf_Dyn), std::string((char *) &newDyn, sizeof(Elf_Dyn)));
+ i++;
}
changed = true;