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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits