-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
llvm-strip breaks symlink #59848
Comments
@llvm/issue-subscribers-tools-llvm-objcopy-strip |
Candidate patch: https://reviews.llvm.org/D141145 |
I think we have made a decision (for crbug.com/1108880 c2a8477 @manojgupta) that we always create a new file instead of reusing the existing file. This is more in line with most other The binutils behavior of following symlinks and doing |
@MaskRay So this issue is not a bug and then i close the review? |
I think so but you may wait a bit for more feedback. |
imho, breaking devel symlinks (foo.so -> foo.so.x -> foo.so.x.y) by simple llvm-srip foo.so* should be reported as an error. in the current state compiler/linker/runtime-loader may pick different files after "foo upgrade" |
I think this is not very critical if llvm-strip will break symlink and create regular file instead, but such behaviour may cause negative side-effects for example in someone scripts which expect a symlink but instead we provide regular file |
Build infrastructure are users. We tried switching over to llvm-strip to deal with an issue we are having with GNU strip and ran into this issue which broken building our ports / packages.
|
- Use llvm-objcopy instead of (binutils) objcopy when creating detached debug symbols and adding the gnu-debuglink section. - For llvm-objcopy and strip, output to a temporary file and copy it back to the original file. The LLVM tools create a new file, so hard links are not normally maintained, but this method keeps them. llvm/llvm-project#59848 (comment) ok naddy@. This should allow us to move back to llvm-strip in base on archs where we use ld.lld, which (alongside the change to llvm-objcopy) avoids problems that have been seen during mimmutable(2) development with GNU_RELRO with the version of binutils that we have.
The part that needed a workaround in ports.. |
Please consider following shell testcase:
llvm-strip (15.0.6) breaks
empty.so
symlink and reportsKO2
. binutils strip works fine.The text was updated successfully, but these errors were encountered: