diff options
Diffstat (limited to 'coro.c')
-rw-r--r-- | coro.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -67,6 +67,12 @@ static volatile coro_func coro_init_func; static volatile void *coro_init_arg; static volatile coro_context *new_coro, *create_coro; +/* what we really want to detect here is wether we use a new-enough version of GAS */ +/* instead, check for gcc 3 and ELF and hope for the best */ +#if __GNUC__ >= 3 && __ELF__ +# define HAVE_CFI 1 +#endif + static void coro_init (void) { @@ -75,7 +81,13 @@ coro_init (void) coro_transfer ((coro_context *)new_coro, (coro_context *)create_coro); +#if HAVE_CFI + asm (".cfi_startproc"); +#endif func ((void *)arg); +#if HAVE_CFI + asm (".cfi_endproc"); +#endif /* the new coro returned. bad. just abort() for now */ abort (); |