title: Getting the memory address of a function in linux x86
body: <p>I have been seeing a lot of exploits that write the memory address of functions/code into the EIP and was wondering if there was a way (maybe with gdb or something) that I could use to determine the memory address of some shellcode I am using in a buffer overflow test and use the python struct library to pack it into the return pointer.</p>
  <p>Right now, I am examining the stack with gdb and using NOPS in my code to figure out the address of the function but it is really just a guessing game. Does anyone know what I can do?</p>