-
Notifications
You must be signed in to change notification settings - Fork 233
No target symbol hints for "jalr ra" instructions #129
Comments
It should be pretty straight-forward, but I'm having some trouble actually figuring it out... It looks like I'm afraid I'm not going to be able to look at it for a bit, sorry. |
It is the 's' case that needs to call maybe_print_address for a jalr. Normally this would be called unconditionally in the 'o' case for args matching "o(s)", but without the offset we have args matching "s" and so we need the call in the 's' case. But we probably don't want an unconditional call here, so I think it should just be for a jalr for now. I have a tentative patch that seems to work, but needs more testing, and a minimal testcase to reproduce. |
Ah, thanks. |
Committed a patch upstream to fix this. It adds symbol names to 8 extra jalr insns in the linux kernel I tested it against. |
Thanks! |
Weird, I still find some symbols not being hinted. the gnu-toolchain I used is built with:
A quick test:
Side note: If you need any other information, please let me know. Thanks! |
If you want an up-to-date tree, then use the FSF one. That is where all development is happening now. The riscv/riscv-binutils-gdb tree was necessary when binutils was not upstream, but now it is just an inconvenience, as maintaining two separate binutils trees is almost twice the work. At some point we will update the riscv-binutils-gdb tree to point at the FSF binutils-2.30 release branch, but we haven't had a chance to do that yet. |
OK, thanks! |
Hi folks,
When I disassemble some executable using
objdump -d
,I can have symbol hints at call sites, such as:
If the target address happens to be 4096-byte-aligned to
pc
when doingauipc
, thejalr
then doesn't need anyimm
values. That is, I expect something likeBut what I can actually get is
The result of
ra
instead of0(ra)
is fine to me, but the symbol hints is gone. I am wondering if this is possible to be enhanced? With those symbols life would be a lot more easier in some application.Thanks!
The text was updated successfully, but these errors were encountered: