1
我想将变量“userstack”的值移到ESP寄存器中,然后绝对跳转到变量“location”中包含的内存地址。 这是我的本钱:基本GCC内联汇编问题
// These are the two variables that contains memory addresses
uint32_t location = current_running->LOCATION;
uint32_t userstack = current_running->user_stack;
// And then something like this
__asm__ volatile ("movl userstack, %esp");
__asm__ volatile ("ljmp $0x0000, location");
然而,当我尝试编译我得到的错误: “错误:后缀或操作数LJMP无效”和“未定义的参考`userstack'”。
任何帮助将非常感激。