<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 - Incorrect relocation for no PLT PIC code without optimization"
   href="https://bugs.llvm.org/show_bug.cgi?id=35653">35653</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect relocation for no PLT PIC code without optimization
          </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>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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>compnerd@compnerd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ bin/clang -target x86_64-unknown-linux-gnu -fomit-frame-pointer
-mstack-alignment=8 -fno-plt -fPIC -x c -S - -o - <<< '
void f(void);
void g(void) { return f(); }
'
        .text
        .file   "-"
        .globl  g                       # -- Begin function g
        .p2align        4, 0x90
        .type   g,@function
g:                                      # @g
        .cfi_startproc
# %bb.0:                                # %entry
        callq   f
        retq
.Lfunc_end0:
        .size   g, .Lfunc_end0-g
        .cfi_endproc
                                        # -- End function

        .ident  "clang version 6.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
efe67fdaf10325b04b6a6af538bed43eea8103a1) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
bcf3bed73b8653dcce398f7d64dbb4e78a0746f2)"
        .section        ".note.GNU-stack","",@progbits

$ bin/clang -target x86_64-unknown-linux-gnu -fomit-frame-pointer
-mstack-alignment=8 -O1 -fno-plt -fPIC -x c -S - -o - <<< '
void f(void);
void g(void) { return f(); }
'
        .text
        .file   "-"
        .globl  g                       # -- Begin function g
        .p2align        4, 0x90
        .type   g,@function
g:                                      # @g
        .cfi_startproc
# %bb.0:                                # %entry
        jmpq    *f@GOTPCREL(%rip)       # TAILCALL
.Lfunc_end0:
        .size   g, .Lfunc_end0-g
        .cfi_endproc
                                        # -- End function

        .ident  "clang version 6.0.0 (<a href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a>
efe67fdaf10325b04b6a6af538bed43eea8103a1) (<a href="http://llvm.org/git/llvm.git">http://llvm.org/git/llvm.git</a>
bcf3bed73b8653dcce398f7d64dbb4e78a0746f2)"
        .section        ".note.GNU-stack","",@progbits

Note that we generate `callq f` rather than `callq *f@GOTPCREL(%rip)`.</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>