To assemble and link an assembly program (32 bits), use the commands:
$ nasm -felf foo.asm -o foo.o
$ gcc -m32 foo.o -o foo
However, on the lab machines you will need to use a different command:
$ gcc -m32 -B /home/mids/m164122/libc foo.o -o foo
This is a hack around the lab machines not currently having all of the packages
you need to link the files. To make things more convenient, you can create an
alias:
alias link32="gcc -m32 -B /home/mids/m164122/libc"
You can put that in your ~/.bashrc
and then open up another shell
so you can use this command as:
$ link32 foo.o -o foo
More information will be added here later.