From 42d4d4ebcf85e2bf6b2d1dab01535ebb63c3b07d Mon Sep 17 00:00:00 2001 From: Scott Linder Date: Thu, 20 Sep 2018 17:07:54 -0400 Subject: [PATCH] Apply dynamic relocations for STT_FUNC symbols Required to support function calls through GOT table. Change-Id: I174a0269fdd67369d38fe41855b7bd01f350b839 [ROCm/ROCR-Runtime commit: 47f0e6f7d354a7d63a25ef22cc5bd55f1959fd3b] --- projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp index eb3511f18e..77dac63052 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/executable.cpp @@ -1697,6 +1697,7 @@ hsa_status_t ExecutableImpl::ApplyDynamicRelocation(hsa_agent_t agent, amd::hsa: switch (rel->symbol()->type()) { case STT_OBJECT: case STT_AMDGPU_HSA_KERNEL: + case STT_FUNC: { Segment* symSeg = VirtualAddressSegment(rel->symbol()->value()); symAddr = reinterpret_cast(symSeg->Address(rel->symbol()->value()));