$ gcc -S test.c<br><br>$ cat test.s<br><br> .file "test.c"<br> .text<br> .globl __GI___testfunc<br> .hidden __GI___testfunc<br> .type __GI___testfunc, @function<br>__GI___testfunc:<br>.LFB0:<br>
.cfi_startproc<br> pushq %rbp<br> .cfi_def_cfa_offset 16<br> .cfi_offset 6, -16<br> movq %rsp, %rbp<br> .cfi_def_cfa_register 6<br> movl $0, %eax<br> popq %rbp<br> .cfi_def_cfa 7, 8<br>
ret<br> .cfi_endproc<br>.LFE0:<br> .size __GI___testfunc, .-__GI___testfunc<br> .globl __testfunc<br> .set __testfunc,__GI___testfunc<br> .weak __GI_testfunc<br> .hidden __GI_testfunc<br>
.set __GI_testfunc,__testfunc<br> .ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"<br> .section .note.GNU-stack,"",@progbits<br><br>$ gcc -S test.c -fplugin=dragonegg.so<br><br>test.c:17:29: error: ‘*__GI_testfunc’ aliased to undefined symbol ‘__testfunc’<br>
<br>I am trying to compile this file using llvm as backend (dragonegg)<br><br><br><div class="gmail_quote">On Fri, Jan 25, 2013 at 10:45 PM, abhirup dutta <span dir="ltr"><<a href="mailto:abyrupus@gmail.com" target="_blank">abyrupus@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br><br>This is my first post, sorry if not in the right format.<br><br>I am stuck at a place where I have a code fragment that runs in normal gcc but fails when I give -fplugin=dragonegg.so<br>
<br><font><span style="font-size:10pt">extern int *testfunc();<br>
<br>
extern __typeof (testfunc) testfunc __asm__ ("" "__GI_testfunc") __attribute__ ((visibility ("hidden")));<br>
<br>
extern __typeof(testfunc) __testfunc;<br>
<br>
extern __typeof (__testfunc) __testfunc __asm__ ("" "__GI___testfunc") __attribute__ ((visibility ("hidden")));<br>
<br>
int *__testfunc()<br>
{<br>
return 0;<br>
}<br>
<br>
extern __typeof (__testfunc) __EI___testfunc __asm__("" "__testfunc"); <br>
<br>
extern __typeof (__testfunc) __EI___testfunc __attribute__((alias ("" "__GI___testfunc")));<br>
extern __typeof(__testfunc) testfunc __attribute__ ((weak, alias ("__testfunc")));<br>
=================================================<br><br>Thanks <br></span></font>
</blockquote></div><br><br clear="all"><br>-- <br>Abhirup Dutta,<div>MTS, CPE team,</div><div>NetApp Sys Pvt Ltd</div>