https://bugs.llvm.org/show_bug.cgi?id=48563
Bug ID: 48563
Summary: Clang/LLVM expose a weak symbol, preventing us
linking.
Product: new-bugs
Version: 10.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
We use an ASM macro to create an Alias extensively in our operating system,
however under LLVM/Clang it does not work, preventing us using the LLVM
toolchain from compiling the Operating System (www.aros.org).
#define __AROS_GM_STACKALIAS(fname, alias) \
void alias(void); \
asm(".weak " __GM_STRINGIZE(alias) "\n" \
"\t.set " __GM_STRINGIZE(alias) "," #fname \
);
The following is a simplified testcase showing the behaviour -:
extern void foo(void);
void bar(void);
asm(".weak foo\n"
"\t.set foo,bar");
void*functable[] =
{
&foo,
(void *)0
};
When this is compiled with GNU/GCC, we only have 2 symbols exposed - "bar", and
"functable", however with LLVM/Clang - there is also a weak reference for "foo"
exposed, which then is not resolved during linking.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs