<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 --- - Undefined reference to __builtin_init_heap_trampoline"
   href="http://llvm.org/bugs/show_bug.cgi?id=16015">16015</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Undefined reference to __builtin_init_heap_trampoline
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>dragonegg
          </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>New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>baldrick@free.fr
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>scott+llvm+bugzilla@pakin.org
          </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>Created <span class=""><a href="attachment.cgi?id=10515" name="attach_10515" title="Sample Go code that doesn't link with DragonEgg">attachment 10515</a> <a href="attachment.cgi?id=10515&action=edit" title="Sample Go code that doesn't link with DragonEgg">[details]</a></span>
Sample Go code that doesn't link with DragonEgg

Compiling and linking virtually any Go program with DragonEgg results in a
failure to find __builtin_init_heap_trampoline:

$ gccgo --version
gccgo (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gccgo trampoline.go -o trampoline
$ gccgo -fplugin=/usr/local/lib/dragonegg.so trampoline.go -o trampoline
/tmp/ccpimsLI.o:trampoline.go:function main.main: error: undefined reference to
'__builtin_init_heap_trampoline'
collect2: error: ld returned 1 exit status

It seems that this symbol is being used when compiling closures with nontrivial
bodies (i.e., that can't be optimized out).  Only very simple Go programs work
with DragonEgg.

-- Scott</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>