I have a number of questions regarding gdb and objdump.
Addresses in objdump
If I do: objdump -d binary-file-name, then I get output that includes this part:
Disassembly of section .text:
080484a0 <_start>:
80484a0: 31 ed xor %ebp,%ebp
80484a2: 5e pop %esi
80484a3: 89 e1 mov %esp,%ecx
I assume these numbers in the first column are addresses? But I don't understand how these addresses can be known because when a process is loaded it is placed at a random place in memory right, which means the code has different addresses every time? Or are these addresses relative to the process' addres-space?
And what are the values that are listed under <_start>?
GDB stepping through code
I got a binary file of which I don't have the source code. I want to step through the program, but there is no symbol information. I can't set breakpoints on functionnames or linenumbers. I tried to set a breakpoint on an addresses and this worked, but I can't figure out how to step through the program step by step. When I do: (gdb) s or (gdb) n It says it doesnt have line information and just runs the whole function. Is there a way to step through it, or step through the assembly instructions?