We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
HiI have a function test::Foo::bar, the function address of this function in cpp is (void *) 0x423e70 <_ZN4test3Foo3barEiPvml@plt>(gdb) disassemble 0x423e70Dump 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
Hi there, I have moved your question to the GNU Toolchain forum. Many thanks.