[PATCH] D51434: [HIP] Add -amdgpu-internalize-symbols option to opt

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 29 10:12:05 PDT 2018


yaxunl added a comment.

In https://reviews.llvm.org/D51434#1217772, @tra wrote:

> Could you elaborate on what exactly is the problem this patch fixes?
>  I don't see how internalizing the symbols connects to PLTs. My understanding is that PLTs are used to provide stubs for symbols to be resolved by dynamic linker at runtime. AFAICT AMD does not use shared libs on device side. What do I miss?


When AMDGPU backend generates ELF containing device ISA's, any non-kernel functions require
PLT support to be emitted to ELF. However AMDGPU backend currently does not support that,
which causes error.

Internalization will eliminate any non-kernel functions, therefore works around this limitation.


https://reviews.llvm.org/D51434





More information about the cfe-commits mailing list