<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Support the AArch64 variant PCS symbol st_other value"
   href="https://bugs.llvm.org/show_bug.cgi?id=48368">48368</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Support the AArch64 variant PCS symbol st_other value
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>smithp352@googlemail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is an enhancement request for lld to support the AArch64 variant procedure
call standard (PCS) in LLD. This is needed to support SVE functions that follow
the vector procedure calling standard (a variant procedure call standard that
requires more registers to be saved than normal).

Functions that follow a variant PCS need special handling by a dynamic linker.
To mark such functions the AArch64 ABI defines the st_other value
STO_AARCH64_VARIANT_PCS in ELF for the 64 bit Arm Architecture. This is
documented in:
<a href="https://github.com/ARM-software/abi-aa/blob/master/aaelf64/aaelf64.rst#551st_other-values">https://github.com/ARM-software/abi-aa/blob/master/aaelf64/aaelf64.rst#551st_other-values</a>

The static linker's responsibilities with respect to STO_AARCH64_VARIANT_PCS
are small. To quote from the ABI:

"Static linkers must preserve the marking and propagate it to the dynamic
symbol table if any reference or definition of the symbol is marked with
STO_AARCH64_VARIANT_PCS, and add a DT_AARCH64_VARIANT_PCS dynamic tag if
required by the Dynamic Section section."

Message describing motivation and design:
<a href="https://sourceware.org/legacy-ml/binutils/2019-05/msg00294.html">https://sourceware.org/legacy-ml/binutils/2019-05/msg00294.html</a>
LLVM patch that adds STO_AARCH64_VARIANT_PCS to LLVM
<a href="https://reviews.llvm.org/D89138">https://reviews.llvm.org/D89138</a>
binutils patch <a href="https://sourceware.org/pipermail/binutils/2019-May/106963.html">https://sourceware.org/pipermail/binutils/2019-May/106963.html</a>
glibc patch to support STO_AARCH64_VARIANT_PCS
<a href="https://sourceware.org/pipermail/glibc-cvs/2020q1/069075.html">https://sourceware.org/pipermail/glibc-cvs/2020q1/069075.html</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>