Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Hack your way through Stripe's Capture the Flag. Parent comment
gcc -S -o example1.s example1.c
However, example1.s looks very different on Mac than on Linux, in particular, on Mac the parameters are pushed in reverse order:
Leh_func_begin2: ...
movl $1, %eax movl $2, %ecx movl $3, %edx movl %eax, %edi movl %ecx, %esi callq _function
movl $3, %edx movl $2, %esi movl $1, %edi call function
There are no comments on this comment yet.
gcc -S -o example1.s example1.c
However, example1.s looks very different on Mac than on Linux, in particular, on Mac the parameters are pushed in reverse order:
Leh_func_begin2: ...
Whereas on Linux, they are pushed in the order specified in that link: What is the reason behind this? Is it that the stack on OS X is implemented to grow up instead of down?