This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to get the actual address of `func` from func@PLT

Hi
I have a function test::Foo::bar, the function address of this function in cpp is
(void *) 0x423e70 <_ZN4test3Foo3barEiPvml@plt>
(gdb) disassemble 0x423e70
Dump of assembler code for function _ZN4test3Foo3barEiPvml@plt:

0x0000000000423e70 <+0>: adrp x16, 0x513000
0x0000000000423e74 <+4>: ldr x17, [x16,#2272]
0x0000000000423e78 <+8>: add x16, x16, #0x8e0
0x0000000000423e7c <+12>: br x17

it seems like the function address is in PLT, and the actual address is contained in x17 Register. I am wondering can I get the actual function address in GOT during runtime in CPP program? Is there anyway I could get absolute function address through PLT address?

Thanks

Parents Reply Children
No data