mirror of
https://github.com/frida/tinycc
synced 2024-12-22 13:12:34 +03:00
d348a9a51d
tccgen.c: - fix ldouble asm hack - fix a VLA problem on Win64 (also x86_64-gen.c) - patch_type(): make sure that no symbol ever changes from global to static tcc.c: - tcc -vv: print libtcc1.a path also on win32 tccpe.c, tcctools.c: - use unix LF mode to for .def output files (that is for creating reproducible output trees) Makefile: - suppress some warnings when makeinfo is missing - call 'which install' only on win32 tests/Makefile: - change PATH only on WINNT systems (i.e. not if cross-compiling on linux for win32) - asm-c-connect.test: slim output and do diff tccrun.c tccpe.c *-link.c: - integrate former 'pe_relocate_rva()' into normal relocation This also fixes linkage of the unwind data on WIN64 for -run (reported by Janus Lynggaard Thorborg) tccasm.c, tests/tcctest.c: - fix dot (sym_index of -1 crashed in put_elf_reloc) - massage .set a bit (see test) other: - #define SECTION_ABS removed - ST_DATA Section *strtab_section: removed - put_extern_sym2(): take int section number Conflicts: tccelf.c tccpe.c Conflicts: tccelf.c
58 lines
677 B
C
58 lines
677 B
C
#include <stdio.h>
|
|
|
|
#if defined _WIN32 && !defined __TINYC__
|
|
# define _ "_"
|
|
#else
|
|
# define _
|
|
#endif
|
|
|
|
static int x1_c(void)
|
|
{
|
|
printf(" x1");
|
|
return 1;
|
|
}
|
|
|
|
asm(".text;"_"x1: call "_"x1_c; ret");
|
|
|
|
void callx4(void);
|
|
void callx5_again(void);
|
|
|
|
void x6()
|
|
{
|
|
printf(" x6-1");
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
printf("*");
|
|
asm("call "_"x1");
|
|
asm("call "_"x2");
|
|
asm("call "_"x3");
|
|
callx4();
|
|
asm("call "_"x5");
|
|
callx5_again();
|
|
x6();
|
|
printf(" *\n");
|
|
return 0;
|
|
}
|
|
|
|
static
|
|
int x2(void)
|
|
{
|
|
printf(" x2");
|
|
return 2;
|
|
}
|
|
|
|
extern int x3(void);
|
|
|
|
void x4(void)
|
|
{
|
|
printf(" x4");
|
|
}
|
|
|
|
void x5(void);
|
|
void x5(void)
|
|
{
|
|
printf(" x5");
|
|
}
|