Index: ELF/InputFiles.h =================================================================== --- ELF/InputFiles.h +++ ELF/InputFiles.h @@ -149,6 +149,7 @@ MipsReginfoInputSection *MipsReginfo = nullptr; llvm::BumpPtrAllocator Alloc; + llvm::SpecificBumpPtrAllocator> IAlloc; llvm::SpecificBumpPtrAllocator> MAlloc; llvm::SpecificBumpPtrAllocator> EHAlloc; }; Index: ELF/InputFiles.cpp =================================================================== --- ELF/InputFiles.cpp +++ ELF/InputFiles.cpp @@ -204,7 +204,7 @@ // If -r is given, we do not interpret or apply relocation // but just copy relocation sections to output. if (Config->Relocatable) { - Sections[I] = new (Alloc) InputSection(this, &Sec); + Sections[I] = new (IAlloc.Allocate()) InputSection(this, &Sec); break; } @@ -278,7 +278,7 @@ return new (EHAlloc.Allocate()) EHInputSection(this, &Sec); if (shouldMerge(Sec)) return new (MAlloc.Allocate()) MergeInputSection(this, &Sec); - return new (Alloc) InputSection(this, &Sec); + return new (IAlloc.Allocate()) InputSection(this, &Sec); } template void elf::ObjectFile::initializeSymbols() {