<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>I am trying to wrap my head around the virtual to physical memory address translation. For example let's say I want to locate the sys_call_table.<br></div><div><br></div><div>objdump and vmlinux shows me this:</div><div>aruna@debian:~/linux-5.1.1$ objdump -t vmlinux | grep -i sys_call_table<br>ffffffff81c001c0 g     O .rodata    0000000000001120 sys_call_table<br>ffffffff81c01600 g     O .rodata    0000000000000d60 ia32_sys_call_table<br></div><div><br></div><div>and System.map shows me this:</div><div>aruna@debian:~/linux-5.1.1$ cat System.map | grep -i sys_call_table<br>ffffffff81c001c0 R sys_call_table<br>ffffffff81c01600 R ia32_sys_call_table<br></div><div><br></div><div>So addresses match.<br></div><div><br></div><div>And gdb shows me this:</div><div>aruna@debian:~/linux-5.1.1$ gdb vmlinux<br>GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1<br>Reading symbols from vmlinux...done.</div><div><br></div><div>(gdb) p sys_call_table<br>$1 = {0xffffffff812317a0 <__x64_sys_read>, <br>  0xffffffff812318b0 <__x64_sys_write>, 0xffffffff8122d980 <__x64_sys_open>, <br>  0xffffffff8122bc40 <__x64_sys_close>, <br>  0xffffffff81236220 <__x64_sys_newstat>, <br>  0xffffffff812363e0 <__x64_sys_newfstat>, <br></div><div>  <snip><br></div><div><br></div><div>Now if you take the address given by objdump and System.map which is 0xffffffff81c001c0</div><div>and ask gdb to show you I get:<br></div><div><br></div><div>(gdb) x 0xffffffff81c001c0<br>0xffffffff81c001c0 <sys_call_table>:    0x812317a0</div><div><br></div><div>My question is HOW is the address 0xffffffff81c001c0 translated to 0x812317a0 ? I am reading up on page tables and page offsets just can't yet fully understand how it is done. A example that <br></div><div>breaks down the process step by step would really help. <br></div><div><br></div><div>Thanks - Aruna<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div></div>