diff --git a/src/zipr.cpp b/src/zipr.cpp index a708a4fa744777c3e0e9c7a47914d74b78dbc317..9dd854e3b0ea6c948b294685ed67a332dafcaef5 100644 --- a/src/zipr.cpp +++ b/src/zipr.cpp @@ -735,6 +735,21 @@ void ZiprImpl_t::FindFreeRanges(const std::string &name) if (m_verbose) printf("Adding (mysterious) free range 0x%p to EOF\n", (void*)new_free_page); start_of_new_space=new_free_page; + + for(auto scoop : m_firp->GetDataScoops()) + { + if(scoop->isExecuteable()) continue; + // put scoops in memory to make sure they are busy, + // just in case they overlap with free ranges. + // this came up on Aarch64 because data is in the .text segment. + cout<<"Pre-allocating scoop "<<scoop->GetName() << "=(" + << scoop->GetStart()->GetVirtualOffset() << "-" + << scoop->GetEnd() ->GetVirtualOffset() << ")"<<endl; + memory_space.PlopBytes(scoop->GetStart()->GetVirtualOffset(), + scoop->GetContents().c_str(), + scoop->GetContents().size() + ); + } }