<div dir="ltr">Apologies, I meant IMAGE_REL_AMD64_ADDR32NB instead of IMAGE_REL_AMD64_ADDR32.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 3, 2014 at 5:51 PM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello all,<div><br></div><div>MSVC-style RTTI when targeting x86_64 requires creating references to symbols using image-base relative relocations (IMAGE_REL_AMD64_ADDR32 in PE/COFF, similar to ELF's R_X86_64_RELATIVE).  This is currently supported at the MC layer, one may have:</div>

<div><br></div><div>.data</div><div>foo:</div><div>    .quad foo@imgrel</div><div><br></div><div>This would create a symbol which points to it's own image-relative offset.</div><div><br></div><div>To my knowledge, LLVM IR gives no way to refer to the address of a symbol using a relocation and thus the above result cannot be obtained.</div>

<div><br></div><div>Seeing as how we want to support MSVC-style RTTI from clang, how should we represent image-relative relocations in the IR?</div><div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-- </div><div>David Majnemer</div>
</font></span></div>
</blockquote></div><br></div>