Whenever there is a call to a function of a dynamically linked library (0x400586 in the example at the end), the call first leads to a few lines in the .plt section, which in turn starts with a jmp to an address found in the GOT (see 0x400450). It looks like this (unconditional!) jmp does not get executed the first time, which makes sense, as the GOT has not been set up yet, and will be done with the following lines (0x400456). But what kind of magic prevents the jmp at 0x400450 from being taken the first time?
here's some code to clarify my question:
0x400586: call 0x400450 <puts@plt>
puts@plt then looks like this:
0x400450: jmp QWORD PTR [rip+0x200bc2] 0x400456: push 0x0 0x40045b: jmp 0x400440