[llvm] [gold] Use ld.bfd for tests (PR #130981)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 02:24:49 PDT 2026


nikic wrote:

I looked into the linkonce_odr_unnamed_addr.ll test (where linkonce_odr is not getting converted to weak_odr if there is a linkonce_odr in a native object occurring later in the link). ld.gold reports the symbol as PREVAILING_DEF, while ld.bfd reports it as PREVAILING_DEF_IRONLY. This seems like a bug in ld.bfd to me. If the IR symbol is prevailing, then the native symbol should be treated as a reference to it, so it's not IRONLY. It does seem to work fine if I place the symbols in a comdat, which is presumably why this ends up working in practice.

https://github.com/llvm/llvm-project/pull/130981


More information about the llvm-commits mailing list