Hi, This is my first post, sorry if not in the right format. 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 extern int *testfunc(); extern __typeof (testfunc) testfunc __asm__ ("" "__GI_testfunc") __attribute__ ((visibility ("hidden"))); extern __typeof(testfunc) __testfunc; extern __typeof (__testfunc) __testfunc __asm__ ("" "__GI___testfunc") __attribute__ ((visibility ("hidden"))); int *__testfunc() { return 0; } extern __typeof (__testfunc) __EI___testfunc __asm__("" "__testfunc"); extern __typeof (__testfunc) __EI___testfunc __attribute__((alias ("" "__GI___testfunc"))); extern __typeof(__testfunc) testfunc __attribute__ ((weak, alias ("__testfunc"))); ================================================ Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130125/eac41d7b/attachment.html>
$ gcc -S test.c $ cat test.s .file "test.c" .text .globl __GI___testfunc .hidden __GI___testfunc .type __GI___testfunc, @function __GI___testfunc: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl $0, %eax popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE0: .size __GI___testfunc, .-__GI___testfunc .globl __testfunc .set __testfunc,__GI___testfunc .weak __GI_testfunc .hidden __GI_testfunc .set __GI_testfunc,__testfunc .ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3" .section .note.GNU-stack,"", at progbits $ gcc -S test.c -fplugin=dragonegg.so test.c:17:29: error: ‘*__GI_testfunc’ aliased to undefined symbol ‘__testfunc’ I am trying to compile this file using llvm as backend (dragonegg) On Fri, Jan 25, 2013 at 10:45 PM, abhirup dutta <abyrupus at gmail.com> wrote:> Hi, > > This is my first post, sorry if not in the right format. > > 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 > > extern int *testfunc(); > > extern __typeof (testfunc) testfunc __asm__ ("" "__GI_testfunc") > __attribute__ ((visibility ("hidden"))); > > extern __typeof(testfunc) __testfunc; > > extern __typeof (__testfunc) __testfunc __asm__ ("" "__GI___testfunc") > __attribute__ ((visibility ("hidden"))); > > int *__testfunc() > { > return 0; > } > > extern __typeof (__testfunc) __EI___testfunc __asm__("" "__testfunc"); > > extern __typeof (__testfunc) __EI___testfunc __attribute__((alias ("" > "__GI___testfunc"))); > extern __typeof(__testfunc) testfunc __attribute__ ((weak, alias > ("__testfunc"))); > ================================================> > Thanks >-- Abhirup Dutta, MTS, CPE team, NetApp Sys Pvt Ltd -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130126/5f22f7f7/attachment.html>
Hi, On 26/01/13 04:45, abhirup dutta wrote:> Hi, > > This is my first post, sorry if not in the right format. > > I am stuck at a place where I have a code fragment that runs in normal gcc but > fails when I give -fplugin=dragonegg.soplease open a bug report in bugzilla (http://llvm.org/bugs/). Ciao, Duncan.> > extern int *testfunc(); > > extern __typeof (testfunc) testfunc __asm__ ("" "__GI_testfunc") __attribute__ > ((visibility ("hidden"))); > > extern __typeof(testfunc) __testfunc; > > extern __typeof (__testfunc) __testfunc __asm__ ("" "__GI___testfunc") > __attribute__ ((visibility ("hidden"))); > > int *__testfunc() > { > return 0; > } > > extern __typeof (__testfunc) __EI___testfunc __asm__("" "__testfunc"); > > extern __typeof (__testfunc) __EI___testfunc __attribute__((alias ("" > "__GI___testfunc"))); > extern __typeof(__testfunc) testfunc __attribute__ ((weak, alias ("__testfunc"))); > ================================================> > Thanks > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >