I’m trying to understand parameter passing in go ELF binaries
mov %rdi,0x8(%rsp) <----- first parameter (?)
mov %r8,0x10(%rsp) <----- second
mov %r9,0x18(%rsp) <----- third
mov %r10,0x20(%rsp) <----- fourth
mov %rcx,0x28(%rsp) <----- fifth
sub %edx,%ebx
movslq %ebx,%rcx
mov %rcx,0x30(%rsp) <----- sixth
callq 5aaba0 <math/big.nat.shl> <----- call to native golang func
It seems that parameters are passed on stack, but when I look at the function here (line 681):
// z = x << s
func (z nat) shl(x nat, s uint) nat { ... }
The number of parameter is just 2, and in the ELF it looks like 6 (?)