What is the equivalent of __declspec( naked ) in gcc/g++? __declspec( naked ) is actually used to declare a function without any epilogue and prologue.
What is the equivalent of __declspec( naked ) in gcc/g++ ? __declspec( naked )
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I believe there is no such equivalent with a recent GCC under Linux. The compiler emit prologues and epilogues when appropriate, and you should leave that decision to it. It may be quite good at making prologues or epilogues quite small, or even sometimes non-existent.
You could code your function in assembly. Or you can put asm statements inside your function.
And you did not tell why you want to do that. What is your goal, and why precisely are you asking?