[PATCH] D110422: [AIX] Enable PGO without LTO
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 10:40:56 PDT 2021
jsji added a comment.
> In other binary formats the first weak definition is selected and other weak definitions are discarded.
> Do you mean that AIX ld doesn't pick the first weak definition?
No. I think this is exactly what is causing problem here.
eg: if we have two weak symbols (weak_func), and we generate the weak counter/data as usual:
__llvm_prf_cnts:
__profc_weak_func(1):
__profc_weak_func(2):
__llvm_prf_data:
__profd_weak func(1):
Pos_Rel __profc_weak_func <=== Relocation to calculate the relative pointer
__profd_weak_func(2):
Pos_Rel __profc_weak_func <=== Relocation to calculate the relative pointer
The relative pointer calculation in __profd_weak_fun will be wrong after linking.
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