-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to link before objdump #6
Comments
Is this with or without the |
that's w/o. But even with So I use the sdk to compile some examples and use them.. now ghidra are happy with the symbols and all addresses look good to me. |
I can't tell if this is something you want to persue but riscv32-linux also supports shared libraries. |
Oh.. I thought there isn't riscv32-linux.. |
Officially, I don't think there is. There's consensus on what it would look like in terms of system call numbers, ring transitions, shared library mappings, etc. There may be a way to boot rv32 on something like QEMU. The reality is that the commercial-grade RV32 chips we've seen are just too wimpy to pull it off. Even the much beefier K210 with 8MB of memory and an MMU was rejected by the kernel group as just being not useful beyond a learning oddity for Linux and if you're going to emulate it, you might as well emulate RV64. It's sometimes useful to use such a toolchain on another (lighter weight) OS as things like newlib are a little more fleshed out than the bare metal uinknown-elf variations, even if not running on Linux itself. I won't say that RV32 chips with RV39, Machine Mode, and access to > 8MB don't exist, but at best, they're very rare. rv32-linux is mostly just developer shorthand notation. |
Currently all functions in the object files from
.a
is compiled into seperated segments, thus all function calls between these functions even within the same object file are relocatable symbols. Objdump cannot provide the correct link to the target, neither Ghdira nor radare does so.It also seems that riscv toolchain in 32bits cannot link shared library correctly since it's only supported in riscv64-linux.
We might ended up with compiling and link a minimal executable without stripping the symbols and unused function and analysis based on that executable.
The text was updated successfully, but these errors were encountered: