[llvm] [BOLT] Ignore duplicate global symbols (PR #201082)
Jinjie Huang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 23:11:46 PDT 2026
Jinjie-Huang wrote:
> I don't know if duplicate global symbols constitute an UB, but this is conceptually similar to an ODR violation. At least, this is unspecified/implementation-defined behavior, and I'd avoid perpetuating it with BOLT. The fix belongs in the build configuration.
@aaupov Thanks for the feedback. This might not actually be a developer-caused ODR violation. The use of '.symver' seems to be a standard behavior that is supported and correctly handled by linkers. Since libbsd and libnuma are fundamental low-level libraries, most developers might just simply link against them, which would result in their entire program failing to be optimized by BOLT.
https://github.com/llvm/llvm-project/pull/201082
More information about the llvm-commits
mailing list