<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>Hi, Leonard,</p>
    <p>What are the motivating use cases?</p>
    <p> -Hal</p></blockquote><div>The immediate use case for us specifically would be a way to explicitly request static PLT relocations. We rolled out a new relocation for AArch64 (<a href="https://reviews.llvm.org/D81184">R_AARCH64_PLT32</a>) which takes the offset between the PLT entry for a function and some other symbol. In IR, we can then explicitly request this relocation with `pltentry(@function) - @global` and distinguish it from `@function - @global` which may or may not lower to R_AARCH64_PREL32 if both symbols are dso_local. This is especially useful for the <a href="https://reviews.llvm.org/D72959">relative vtables ABI</a> where we can benefit in size by not having to emit dso_local stubs for some functions.</div><div><br></div><div>In the general case, this just adds a way for semantically representing PLT entries for functions and would ideally add more "correctness". From an IR perspective, users won't need to second-guess "what will this function be lowered to".</div></div></div>