<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 - lld master error: can't create dynamic relocation R_AARCH64_PREL64"
   href="https://bugs.llvm.org/show_bug.cgi?id=32518">32518</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld master error: can't create dynamic relocation R_AARCH64_PREL64
          </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>Linux
          </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>minseong.kim@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18217" name="attach_18217" title="creduced object">attachment 18217</a> <a href="attachment.cgi?id=18217&action=edit" title="creduced object">[details]</a></span>
creduced object

This error occurs with lld at symbol resolution, but it works fine with bfd or
gold. I have attached 2 set of sources, normal and creduced.

  1. Noraml
    - Command: ld.lld -shared sha1-armv8.o -o sha1-armv8.lld.so
    - Output:  ld.lld: error: sha1-armv8.S:1202: can't create dynamic
relocation R_AARCH64_PREL64 against symbol 'OPENSSL_armcap_P' defined in
sha1-armv8.o
    - Original sha1-armv8.orig.S from which sha1-armv8.o is generated.

  2. Creduced 
    - Command: ld.lld -shared sha1-armv8.creduced.o -o sha1-armv8.lld.so
    - Output: ld.lld: error: sha1-armv8.creduced.o:(.text+0x0): can't create
dynamic relocation R_AARCH64_PREL64 against symbol 'a' defined in
sha1-armv8.creduced.o
    - Creduced sha1-armv8.S from which sha1-armv8.creduced.o is generated.

It seems that the root cause of this error is that the symbol,
R_AARCH64_PREL64, is evaluated as preemptible. I am not sure this is a subtle
corner case of symbol resolution or intentional.</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>