Memory address problem in GNU Debugger

enter image description here

I’m new to gbd. I’ve wrote a simple program which will print hello world 10 times(I’ve listed the program in the screenshot). Then I’ve displayed the assembly language and set the break point to main and after running the program untill main, I’ve displayed the content of the rip register.

Now the confusion is, in the assembly code, the memory addresses are 0000…and then some number, but in the rip register the addresses are 55555…and then some number. For example in the line 4, containing mov instruction, the adderss is 0x000000000000113d and in the rip register the address is 0x55555555513d. I’m assuming those two addresses are same based on the common ending (13d), although not sure. But the previous digits are different. Why?

Go to Source
Author: Abhirup Bakshi