title: How do you assemble, link and run a .s file in linux?
body: <p>I'm getting a weird error message when trying to assemble and run a .s file using AT&amp;T Intel Syntax. Not sure if I'm even using the correct architecture to begin with, or if I'm having syntax errors, if I'm not using the correct commands to assemble and link, etc. Completely lost and I do not know where to begin. </p>
  
  <p>So basically, I have a file called yea.s , which contains some simple assembler instructions. I then try to compile it using the command <code>as yea.s -o yea.o</code> and then link is using <code>ld yea.o -o yea</code>. When running ld, I get this weird message:<code>ld: warning: cannot find entry symbol _start; defaulting to 000000440000</code>. </p>
  
  <p>This is the program im trying to run, very simple and doesn't really do anything. </p>
  
  <pre><code>resMsg: .asciz "xxxxxxxx"
  
  .text
  .global main
  main:
  pushq $0
  ret
  </code></pre>
  
  <p>I just cannot figure out what's going on. Obviously, this is for school homework. I'm not looking for the answer to the homework, obviously, but this is the starting point to where I can actually start the coding. And I just cant figure out how to simple run the program, which it doesn't say in the assignment. Anyway, thanks in advance guys!</p>