aboutsummaryrefslogtreecommitdiff
path: root/src/resolve-system-dependencies/resolve-system-dependencies.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve-system-dependencies/resolve-system-dependencies.cc')
-rw-r--r--src/resolve-system-dependencies/resolve-system-dependencies.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/resolve-system-dependencies/resolve-system-dependencies.cc b/src/resolve-system-dependencies/resolve-system-dependencies.cc
index 8f0c99c84..434ad80a6 100644
--- a/src/resolve-system-dependencies/resolve-system-dependencies.cc
+++ b/src/resolve-system-dependencies/resolve-system-dependencies.cc
@@ -39,12 +39,18 @@ std::set<std::string> runResolver(const Path & filename)
throw SysError("statting '%s'", filename);
if (!S_ISREG(st.st_mode)) {
- printError("file '%s' is not a regular file", filename);
+ logError({
+ .name = "Regular MACH file",
+ .hint = hintfmt("file '%s' is not a regular file", filename)
+ });
return {};
}
if (st.st_size < sizeof(mach_header_64)) {
- printError("file '%s' is too short for a MACH binary", filename);
+ logError({
+ .name = "File too short",
+ .hint = hintfmt("file '%s' is too short for a MACH binary", filename)
+ });
return {};
}
@@ -66,13 +72,19 @@ std::set<std::string> runResolver(const Path & filename)
}
}
if (mach64_offset == 0) {
- printError(format("Could not find any mach64 blobs in file '%1%', continuing...") % filename);
+ logError({
+ .name = "No mach64 blobs",
+ .hint = hintfmt("Could not find any mach64 blobs in file '%1%', continuing...", filename)
+ });
return {};
}
} else if (magic == MH_MAGIC_64 || magic == MH_CIGAM_64) {
mach64_offset = 0;
} else {
- printError(format("Object file has unknown magic number '%1%', skipping it...") % magic);
+ logError({
+ .name = "Magic number",
+ .hint = hintfmt("Object file has unknown magic number '%1%', skipping it...", magic)
+ });
return {};
}