Skip to content

Commit 393fc03

Browse files
committed
Skip empty section (fixes NixOS#66)
1 parent 0ea5aff commit 393fc03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/patchelf.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,9 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsExecutable()
684684
for (unsigned int i = 1; i <= lastReplaced; ++i) {
685685
Elf_Shdr & shdr(shdrs[i]);
686686
string sectionName = getSectionName(shdr);
687+
if (sectionName == "") {
688+
continue;
689+
}
687690
debug("looking at section `%s'\n", sectionName.c_str());
688691
/* !!! Why do we stop after a .dynstr section? I can't
689692
remember! */

0 commit comments

Comments
 (0)