[LLVMbugs] [Bug 15090] New: Code snippet with weak alias, __attribute__ etc failing on dragonegg
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 28 08:45:24 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15090
Bug #: 15090
Summary: Code snippet with weak alias, __attribute__ etc
failing on dragonegg
Product: dragonegg
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: New Bugs
AssignedTo: baldrick at free.fr
ReportedBy: abyrupus at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The following code runs well with gcc but fails with dragonegg plugin.
test.c
============================================
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")));
=================================================
gcc -S test.c gives
=================================================
.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 gives
====================================
test.c:17:29: error: ‘*__GI_testfunc’ aliased to undefined symbol ‘__testfunc’
=====================================
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list