<html>
    <head>
      <base href="http://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 --- - Cannot form relocation for reference to GOT in 64-bit X86"
   href="http://llvm.org/bugs/show_bug.cgi?id=19470">19470</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot form relocation for reference to GOT in 64-bit X86
          </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: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>david.majnemer@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>consider:
        .text
        .file   "/var/tmp/t.ll"
        .globl  fun
        .align  16, 0x90
        .type   fun,@function
fun:                                    # @fun
        .cfi_startproc
# BB#0:
        movl    $_GLOBAL_OFFSET_TABLE_, %eax
        retq
.Ltmp0:
        .size   fun, .Ltmp0-fun
        .cfi_endproc


        .section        ".note.GNU-stack","",@progbits

go with:
~/llvm/build/bin/llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu t.s -o -

#0  0x00007ffff681b425 in __GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff681eb8b in __GI_abort () at abort.c:91
#2  0x00000000006ce406 in llvm::llvm_unreachable_internal (msg=0xe04448
"invalid fixup kind!", file=0xee8505
"~/llvm/src/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp", line=0x64) at
~/llvm/src/lib/Support/ErrorHandling.cpp:99
#3  0x00000000008477c9 in (anonymous
namespace)::X86ELFObjectWriter::GetRelocType (this=0x1431bf0, Target=...,
Fixup=..., IsPCRel=0x0) at
~/llvm/src/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp:100
#4  0x0000000000862944 in (anonymous namespace)::ELFObjectWriter::GetRelocType
(this=0x1435f40, Target=..., Fixup=..., IsPCRel=0x0) at
~/llvm/src/lib/MC/ELFObjectWriter.cpp:186
#5  0x0000000000857e4d in (anonymous
namespace)::ELFObjectWriter::RecordRelocation (this=0x1435f40, Asm=...,
Layout=..., Fragment=0x1439a10, Fixup=..., Target=..., IsPCRel=@0x7fffffffb8e7:
0x0, FixedValue=@0x7fffffffb8e8: 0x1) at
~/llvm/src/lib/MC/ELFObjectWriter.cpp:881
#6  0x00000000005ebd4d in llvm::MCAssembler::handleFixup (this=0x1435510,
Layout=..., F=..., Fixup=...) at ~/llvm/src/lib/MC/MCAssembler.cpp:751
#7  0x00000000005ec449 in llvm::MCAssembler::Finish (this=0x1435510) at
~/llvm/src/lib/MC/MCAssembler.cpp:820
#8  0x000000000087cabd in llvm::MCObjectStreamer::FinishImpl (this=0x1435320)
at ~/llvm/src/lib/MC/MCObjectStreamer.cpp:388
#9  0x0000000000871aba in llvm::MCELFStreamer::FinishImpl (this=0x1435320) at
~/llvm/src/lib/MC/MCELFStreamer.cpp:544
#10 0x00000000006360af in llvm::MCStreamer::Finish (this=0x1435320) at
~/llvm/src/lib/MC/MCStreamer.cpp:639
#11 0x0000000000648c70 in (anonymous namespace)::AsmParser::Run
(this=0x1436280, NoInitialTextSection=0x0, NoFinalize=0x0) at
~/llvm/src/lib/MC/MCParser/AsmParser.cpp:701
#12 0x000000000041e22c in AssembleInput (ProgName=0x7fffffffe062
"~/llvm/build/bin/llvm-mc", TheTarget=0x142d2f8 <llvm::TheX86_64Target>,
SrcMgr=..., Ctx=..., Str=..., MAI=..., STI=..., MCII=...) at
~/llvm/src/tools/llvm-mc/llvm-mc.cpp:335
#13 0x000000000041c171 in main (argc=0x7, argv=0x7fffffffdcc8) at
~/llvm/src/tools/llvm-mc/llvm-mc.cpp:468

It seems that we fail to do anything with X86::reloc_global_offset_table in
64-bit mode.

Note that we cannot perform the simple mapping that we have in 32-bit mode
because we need to take code-model into account.</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>