-
Notifications
You must be signed in to change notification settings - Fork 13.5k
stripping a binary modified by bolt causes it to crash on startup #89336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Striping bolted binaries doesn't work, e.g. #56738 |
I see the original report used llvm-strip from LLVM 18 -- Per #56738 (comment), a fix landed in 19.1; is the issue still present with an LLVM 19 llvm-strip? |
This is partially fixed in 19.1.5.
Observations from the above:
|
@berolinux can you please verify that the below patch fixes the issue you mentioned? If so, we could close this issue (similarly to #56738). Regarding the size issue mentioned, are you sure it is related to bolt+stripping? I would think you'd get some size overhead just with bolt (ie without stripping), it's only with small binaries that it becomes more of a 'dramatic increase'. |
@paschalis-mpeis As I've BOLTed some packages lately, I've noticed that GNU binutils issue as well, llvm-strip was fine though. I haven't tested with a newer GNU binutils but will do so once it is released. Regarding the binary size issue, I've also seen blown up sizes when using certain BOLT options. I heavily suspect The binary size delta was huge: -145 MB. |
Seen with 18.1.3. Simplest example:
Same happens when using gcc and BFD strip instead of clang and llvm-strip.
For obvious reasons, stripping a binary before throwing it at bolt is a bad idea -- but there's no equally obvious reason why stripping a binary after running bolt should break it badly.
Also, a bolt-then-strip binary is much bigger than a stripped binary.
The text was updated successfully, but these errors were encountered: