<p dir="ltr">Lgtm</p>
<div class="gmail_quote">On Jun 13, 2016 6:05 PM, "Konstantin Zhuravlyov" <<a href="mailto:kzhuravl_dev@outlook.com">kzhuravl_dev@outlook.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">kzhuravl updated the summary for this revision.<br>
kzhuravl updated this revision to Diff 60617.<br>
kzhuravl added a comment.<br>
<br>
Added back R_AMDGPU_ABS32_LO, also added R_AMDGPU_ABS32<br>
<br>
<br>
<a href="http://reviews.llvm.org/D21215" rel="noreferrer" target="_blank">http://reviews.llvm.org/D21215</a><br>
<br>
Files:<br>
docs/CodeGenerator.rst<br>
<br>
Index: docs/CodeGenerator.rst<br>
===================================================================<br>
--- docs/CodeGenerator.rst<br>
+++ docs/CodeGenerator.rst<br>
@@ -2672,25 +2672,26 @@<br>
byte alignment. These values use the same byte order as other word values in<br>
the AMD GPU architecture<br>
<br>
-Following notations are used for specifying relocation types<br>
+Following notations are used for specifying relocation calculations:<br>
<br>
* **A** --- Represents the addend used to compute the value of the relocatable<br>
field<br>
+* **P** --- Represents the place (section offset or address) of the storage unit<br>
+ being relocated (computed using ``r_offset``)<br>
* **S** --- Represents the value of the symbol whose index resides in the<br>
relocation entry<br>
<br>
AMDGPU Backend generates *Elf64_Rela* relocation records with the following<br>
supported relocation types:<br>
<br>
- ==================== ===== ========== ============================<br>
- Relocation type Value Field Calculation<br>
- ==================== ===== ========== ============================<br>
- ``R_AMDGPU_NONE`` 0 ``none`` ``none``<br>
- ``R_AMDGPU_32_LOW`` 1 ``word32`` (S + A) & 0xFFFFFFFF<br>
- ``R_AMDGPU_32_HIGH`` 2 ``word32`` ((S + A) >> 32) & 0xFFFFFFFF<br>
- ``R_AMDGPU_64`` 3 ``word64`` S + A<br>
- ``R_AMDGPU_32`` 4 ``word32`` S + A<br>
- ==================== ===== ========== ============================<br>
-<br>
-Only R_AMDGPU_32_LOW and R_AMDGPU_32_HIGH can be handled by the<br>
-dynamic linker. The rest must be statically resolved.<br>
+ ===================== ===== ========== ====================<br>
+ Relocation type Value Field Calculation<br>
+ ===================== ===== ========== ====================<br>
+ ``R_AMDGPU_NONE`` 0 ``none`` ``none``<br>
+ ``R_AMDGPU_ABS32_LO`` 1 ``word32`` (S + A) & 0xFFFFFFFF<br>
+ ``R_AMDGPU_ABS32_HI`` 2 ``word32`` (S + A) >> 32<br>
+ ``R_AMDGPU_ABS64`` 3 ``word64`` S + A<br>
+ ``R_AMDGPU_REL32`` 4 ``word32`` S + A - P<br>
+ ``R_AMDGPU_REL64`` 5 ``word64`` S + A - P<br>
+ ``R_AMDGPU_ABS32`` 6 ``word32`` S + A<br>
+ ===================== ===== ========== ====================<br>
<br>
<br>
</blockquote></div>