Basically I am trying to simulate assembly code in C.
Here is the C code:
int main()
{
test();
main_next:
printf(\"Hello, Worl
GCC generates assembly file first and only then assembles it, so what about creating labels using inline assembly?
void test()
{
__asm__ volatile (
"jmp main_next"
);
}
int main()
{
test();
__asm__ volatile (
"main_next:"
);
printf("hello, world");
}
However, this (obviously) should not be used in real cases, as it doesn't take care of stack at all.