mirror of
https://github.com/mirror/tinycc.git
synced 2025-03-04 08:20:12 +08:00
See testcase (from grischka). If the asm has no .globl, but there's a (non-static) C definition the symbol should be exported, even if the first reference comes from asm.
20 lines
327 B
C
20 lines
327 B
C
#include <stdio.h>
|
|
|
|
int x3(void)
|
|
{
|
|
printf("x3\n");
|
|
return 3;
|
|
}
|
|
|
|
/* That callx4 is defined globally (as if ".globl callx4")
|
|
is a TCC extension. GCC doesn't behave like this. */
|
|
void callx4(void);
|
|
__asm__("callx4: call x4; ret");
|
|
|
|
extern void x5(void);
|
|
void callx5_again(void);
|
|
void callx5_again(void)
|
|
{
|
|
x5();
|
|
}
|