gcc -nostdlib hello.S -o hello
This example uses the old 32-bit syscall invocation mechanism, which works fine under 64-bit Linux. It might be a useful exercise to try porting this program to the 64-bit syscall convention.Oh, interesting. I didn't know you could do that with gcc. Thanks for the tip!
This example uses the old 32-bit syscall invocation mechanism, which works fine under 64-bit Linux. It might be a useful exercise to try porting this program to the 64-bit syscall convention.
I wasn't familiar with the difference, but some googling turned up this SO discussion which seems relevant. Maybe I will try making the change and see if I can get this to run with pure 64 bit code.
http://stackoverflow.com/questions/8510333/x86-64-assembly-l...
[0] https://github.com/lpsantil/rt0/blob/master/src/lib/syscall....
Ah, that is very handy, and very illustrative. Thanks for sharing!
https://www.google.com/search?q=Bartlett+programming+from+th...