[PATCH] D110422: [AIX] Enable PGO without LTO

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 15:02:20 PDT 2021


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



More information about the llvm-commits mailing list