Re:64-bit Linux Return-Oriented Programming
by kryptiskt on Sunday February 15, 2015 @03:38PM
(#9054010)
That's the syscall calling convention, not the C one (though it's more like a platform ABI than something exclusive to C these days). In that, on Linux x64 all the args after the first six are pushed to the stack, on Windows it's after four args.
[ Parent
| on HN ]
Re:64-bit Linux Return-Oriented Programming
by nkurz on Sunday February 15, 2015 @09:39PM
(#9055078)
It's probably worth clarifying that on 64-bit Windows, the first first four arguments are passed in registers regardless of type, and the remainder (if any) are pushed to the stack. But on 64-bit Linux/BSD/OSX, depending on the mix of types, you might have as many as 14 register arguments. You get 6 "integer" registers, plus 8 "vector" registers, where "vector" registers are also used for floating point.