diff --git a/lnt/testing/profile/cPerf.cpp b/lnt/testing/profile/cPerf.cpp --- a/lnt/testing/profile/cPerf.cpp +++ b/lnt/testing/profile/cPerf.cpp @@ -132,7 +132,7 @@ // Returns true if the ELF file given by filename // is a shared object (DYN). -bool IsSharedObject(char *Fname) { +bool IsSharedObject(const std::string &Fname) { // We replicate the first part of an ELF header here // so as not to rely on . struct PartialElfHeader { @@ -141,7 +141,7 @@ }; const int ET_DYN = 3; - FILE *stream = fopen(Fname, "r"); + FILE *stream = fopen(Fname.c_str(), "r"); if (stream == NULL) return false; @@ -664,7 +664,7 @@ // EXEC ELF objects aren't relocated. DYN ones are, // so if it's a DYN object adjust by subtracting the // map base. - bool IsSO = IsSharedObject(E->filename); + bool IsSO = IsSharedObject(BinaryCacheRoot + std::string(E->filename)); Maps.push_back({E->start, E->start + E->extent, IsSO ? E->start - E->pgoff : 0, E->filename}); @@ -684,7 +684,7 @@ // EXEC ELF objects aren't relocated. DYN ones are, // so if it's a DYN object adjust by subtracting the // map base. - bool IsSO = IsSharedObject(E->filename); + bool IsSO = IsSharedObject(BinaryCacheRoot + std::string(E->filename)); Maps.push_back({E->start, E->start + E->extent, IsSO ? E->start - E->pgoff : 0, E->filename});