You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a binary compiled for ARMHF that contains PLT stubs to math library function log.
When I load the binary with cle and use the find_plt_stub_name function, it does not identify the stub at the address that objdump shows.
In the below disassembly, the stub is at 0x518 but cle maps it to 0x51c, which means it probably mis-identifies the start of the stub.
I tracked down the issue to the MetaELF._load_plt function, whose comments say that this is essentially performed by machine code pattern matching. I have not tried understanding the implementation of _load_plt but it looks like the pattern I have in my binary is not captured.
For now, I am checking both addr and addr+4 to find the plt stub name, and it works fine.
This plt stub is called from a tail-call optimized function. I guess this is why it has extra instructions, but I am not sure of this.
Description
I have a binary compiled for ARMHF that contains PLT stubs to math library function
log
.When I load the binary with
cle
and use thefind_plt_stub_name
function, it does not identify the stub at the address thatobjdump
shows.In the below disassembly, the stub is at
0x518
butcle
maps it to0x51c
, which means it probably mis-identifies the start of the stub.I tracked down the issue to the
MetaELF._load_plt
function, whose comments say that this is essentially performed by machine code pattern matching. I have not tried understanding the implementation of_load_plt
but it looks like the pattern I have in my binary is not captured.For now, I am checking both
addr
andaddr+4
to find the plt stub name, and it works fine.This plt stub is called from a tail-call optimized function. I guess this is why it has extra instructions, but I am not sure of this.
Disassembly from
objdump
:Steps to reproduce the bug
Github wont let me attach the ELF binary. I am attaching the full disassembly from
objdump
.myfunc.txt.
Let me know if you need anything else.
Environment
cle
version is 9.2.86Additional context
No response
The text was updated successfully, but these errors were encountered: