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 @@ -1025,6 +1025,7 @@ void ElfFile<ElfFileParamNames>::normalizeNoteSegments()
10251025 [this ](std::pair<const std::string, std::string> & i) { return rdi (findSection (i.first ).sh_type ) == SHT_NOTE; });
10261026 if (!replaced_note) return ;
10271027
1028+ std::vector<Elf_Phdr> newPhdrs;
10281029 for (auto & phdr : phdrs) {
10291030 if (rdi (phdr.p_type ) != PT_NOTE) continue ;
10301031
@@ -1061,11 +1062,13 @@ void ElfFile<ElfFileParamNames>::normalizeNoteSegments()
10611062 if (curr_off == start_off)
10621063 phdr = new_phdr;
10631064 else
1064- phdrs .push_back (new_phdr);
1065+ newPhdrs .push_back (new_phdr);
10651066
10661067 curr_off += size;
10671068 }
10681069 }
1070+ phdrs.insert (phdrs.end (), newPhdrs.begin (), newPhdrs.end ());
1071+
10691072 wri (hdr->e_phnum , phdrs.size ());
10701073}
10711074
You can’t perform that action at this time.
0 commit comments