Is there any equivalent for stdcall in GCC?

試著忘記壹切 提交于 2019-11-30 18:59:22

Is there any equivalence of stdcall in linux?

my kernel in a linux environment

Wait, is this your own kernel, or the Linux kernel? Because if it's your own kernel, it's not Linux any more.

  1. If you're working on Linux, you'll want to stick with regular calling conventions and write your assembly to match.

  2. If you're working on your own kernel, you can do anything you want. GCC and Clang both support stdcall calling conventions on ix86 processors, e.g.,

    #define stdcall __attribute__((stdcall))
    

    See: Function Attributes (GCC manual)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!