[PATCH] D114098: Use BinaryCacheRoot calling IsSharedObject()
Pavel Kosov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 17 22:48:10 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rLNT40cb83afa748: Use BinaryCacheRoot calling IsSharedObject() (authored by kpdev42).
Changed prior to commit:
https://reviews.llvm.org/D114098?vs=387954&id=388113#toc
Repository:
rLNT LNT
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114098/new/
https://reviews.llvm.org/D114098
Files:
lnt/testing/profile/cPerf.cpp
Index: lnt/testing/profile/cPerf.cpp
===================================================================
--- lnt/testing/profile/cPerf.cpp
+++ 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 <elf.h>.
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});
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114098.388113.patch
Type: text/x-patch
Size: 1459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/7b6f9e3d/attachment.bin>
More information about the llvm-commits
mailing list