Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 418 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there any equivalent for stdcall in GCC?

#1
I'm working on my own kernel using GCC, and when calling C functions from asm code, I have to do `add esp,xx` myself. After some searching I found that `stdcall` is a Microsoft invention and can't use it in GCC. Is there any handy way to do this work?
Reply

#2
> 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)][1]

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through