When we put _stdcall
(the caller doesn't need to clear the stack) in the function prototype,is it taken care of by the compiler or linker?
Calling convention influences code generation and so it is the compiler that deals with it. The linker doesn't need to know about that.