<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Linker complains 'R_AARCH64_ABS64 used with TLS symbol'"
   href="https://llvm.org/bugs/show_bug.cgi?id=26998">26998</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Linker complains 'R_AARCH64_ABS64 used with TLS symbol'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kai@redstar.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16053" name="attach_16053" title="IR file demonstrating the bug">attachment 16053</a> <a href="attachment.cgi?id=16053&action=edit" title="IR file demonstrating the bug">[details]</a></span>
IR file demonstrating the bug

The attached file mars1.ll was generated from the following D code:

int array1[3];

void test()
{
    array1[0] = 3;
}

array1 is a TLS variable. Compiling and linking with the commands

llc -filetype=obj mars1.ll
gcc -o cmain -g cmain.c mars1.o

results in the message
/usr/bin/ld: mars1.o(.debug_info+0x2c): R_AARCH64_ABS64 used with TLS symbol
_D5mars16array1G3i

cmain.c contains only:

extern void _D5mars14testFZv();

int main(int argc, char* argv[])
{
    _D5mars14testFZv();
    return 0;
}

LLVM: trunk@263875
gcc: gcc version 4.9.2 (Ubuntu/Linaro 4.9.2-10ubuntu13)</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>