I’m using Ubuntu, and I was looking for an assembler compiler for Linux, and I found GAS.
I’m trying to install it and run it, but I can’t.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
asis the GNU Assembler. It’s found inbinutilsbut if you do:sudo apt-get install build-essentialYou will get
gasalong withgcc(which default usesgasfor assembling on the back end).For a ‘tutorial’ about using
gas, you probably want to read Programming From the Ground Up, which uses it.To build a static executable from a
.sfile,If you want to link with libraries, it’s normally easiest to let gcc use the right command line options for
asandldwhen building an executable from an asm source file.gcc foo.s -o foowill work if yourfoo.sdefines amainfunction.Also related: Assembling 32-bit binaries on a 64-bit system (GNU toolchain) if you’re writing 32-bit programs on an x86-64 system.