MaskRay added a comment. In D110422#3025911 <https://reviews.llvm.org/D110422#3025911>, @jsji wrote:
>> "as binder can NOT discard only part of a csect." this part caused confusion >> to me... > > OK, yeah, csect is special to XCOFF, so this is not the same concept of > sections in ELF. "as binder can NOT discard a subset of a csect."? >> I haven't verified but it is possible that PGO picks the first pair (zero >> value) and have an incorrect counter for `foo`. > > As I mentioned before, we verified (with `llvm-profdata show --all-functions > --counts`) on all SPEC benchmarks that all the counters are good with private > linkage. > >> --- >> >> Does your example imply that the weak symbol `__profc_foo` has 2 definitions >> with conflicting values? > > No, they are identical weak functions. Those offsets are actually from real > example using `std::stringbuf`, > the foo is actually > `_ZNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEC2Ej`. > >> Any idea whether the linker bug will be fixed? > > Unfortunately, I just double confirmed with AIX linker (binder) owner, > there is NO plan in near future of lifting the limitation that binder can NOT > discard only part of a csect. The linker (binder) doesn't have to discard a subset of csect, but it should ensure there are not two non-local symbols with the same name. The latter is what I request. Without section deduplication we just end up with PDP-11 a.out extended with .weak directive, it isn't too bad. Having two non-local symbols could cause serious symbol resolution problems. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110422/new/ https://reviews.llvm.org/D110422 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits