Skip to content

Commit 83b3e13

Browse files
authored
[BOLT] Allow processing of binaries with stripped FILE symbols mismatching the profile (#93238)
Reintroduce allow-stripped as a fallback mechanism after enforcement of HasSymbolsWithFileName was fixed in #92625. This partially reverts commit ccabbff.
1 parent e2a3880 commit 83b3e13

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,12 +3206,14 @@ void RewriteInstance::preprocessProfileData() {
32063206
if (Error E = ProfileReader->preprocessProfile(*BC.get()))
32073207
report_error("cannot pre-process profile", std::move(E));
32083208

3209-
if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName()) {
3209+
if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName() &&
3210+
!opts::AllowStripped) {
32103211
BC->errs()
32113212
<< "BOLT-ERROR: input binary does not have local file symbols "
32123213
"but profile data includes function names with embedded file "
32133214
"names. It appears that the input binary was stripped while a "
3214-
"profiled binary was not\n";
3215+
"profiled binary was not. If you know what you are doing and "
3216+
"wish to proceed, use -allow-stripped option.\n";
32153217
exit(1);
32163218
}
32173219
}

0 commit comments

Comments
 (0)