File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1011,6 +1011,7 @@ void ElfFile<ElfFileParamNames>::normalizeNoteSegments()
1011
1011
[this ](std::pair<const std::string, std::string> & i) { return rdi (findSection (i.first ).sh_type ) == SHT_NOTE; });
1012
1012
if (!replaced_note) return ;
1013
1013
1014
+ std::vector<Elf_Phdr> newPhdrs;
1014
1015
for (auto & phdr : phdrs) {
1015
1016
if (rdi (phdr.p_type ) != PT_NOTE) continue ;
1016
1017
@@ -1047,11 +1048,13 @@ void ElfFile<ElfFileParamNames>::normalizeNoteSegments()
1047
1048
if (curr_off == start_off)
1048
1049
phdr = new_phdr;
1049
1050
else
1050
- phdrs .push_back (new_phdr);
1051
+ newPhdrs .push_back (new_phdr);
1051
1052
1052
1053
curr_off += size;
1053
1054
}
1054
1055
}
1056
+ phdrs.insert (phdrs.end (), newPhdrs.begin (), newPhdrs.end ());
1057
+
1055
1058
wri (hdr->e_phnum , phdrs.size ());
1056
1059
}
1057
1060
You can’t perform that action at this time.
0 commit comments