Some of our apps are failing to link properly with third-party libraries
because this warning has been converted to an error. In principle, we
shouldn't allow this sort of behavior, but I don't see any reasons for
error-ing since it hasn't caused any real issues for us in the past. For
those who wish to keep it as an error, users may provide -fatal-warnings
to keep the existing behavior.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@MaskRay This is effectively a revert of https://github.com/llvm/llvm-project/commit/3ac94280245415be66cb1b603367c5f4f6d498e7 (but keeping the message intact). Do you have any suggestions how to get around this specific issue?
This is shared object parsing and the performance is less important. If it is important, it may be attempting to remove this error check to have less code in the hot path and just assume that all non-local symbols are not STB_LOCAL. Before we do that, we probably want this to be an error for sufficiently long time.
I wonder whether you can consider binary patching the broken shared objects. I have done similar things for my employer (for symbol versioning, not for this STB_LOCAL instance) as well..
If binary patching doesn't look great, use --noinhibit-exec.
I wonder whether you can consider binary patching the broken shared objects. I have done similar things for my employer (for symbol versioning, not for this STB_LOCAL instance) as well..
If binary patching doesn't look great, use --noinhibit-exec.
Patching the binary is something we're probably going to try and pursue, but I wanted to get your thoughts first whether you feel strongly against switching this back to a warning. Using --noinhibit-exec relaxes other errors as well and would prefer not to do that to avoid more broken shared objects from creeping. So far, it's just this specific message that I've seen so far.
errorOrWarn for this instance seems to be better, for (a) the reason I stated in a previous comment, and (b) to match the errorOrWarn binding check ObjFile<EDLFT>::postParse (though we may want to remove that diagnostic completely to remove code from a hot patch in the future)...