-
Notifications
You must be signed in to change notification settings - Fork 20
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
macaw-riscv
: Add PLTStubInfo
for RISC-V programs
#414
Labels
Comments
RyanGlScott
added a commit
that referenced
this issue
Jul 30, 2024
This builds on top of the work in GaloisInc/elf-edit#45. For now, I only add support for a select few relocation types, leaving the rest as future work. This paves a way for an eventual fix for #414.
RyanGlScott
added a commit
that referenced
this issue
Jul 30, 2024
Now that we can load RISC-V relocations in `macaw` (building on top of the work in GaloisInc/elf-edit#45), this patch adds PLT stub heuristics for RISC-V binaries. I have added some test cases in `macaw-riscv-symbolic` which demonstrate that the basic idea works. Note that due to #416, these test cases will print warnings when loaded into `macaw`. These warnings are ultimately harmless, however, as the same relocations are loaded at the same addresses multiple times, which causes no change in behavior. Fixes #414.
RyanGlScott
added a commit
that referenced
this issue
Jul 31, 2024
This builds on top of the work in GaloisInc/elf-edit#45. For now, I only add support for a select few relocation types, leaving the rest as future work. This paves a way for an eventual fix for #414.
RyanGlScott
added a commit
that referenced
this issue
Jul 31, 2024
Now that we can load RISC-V relocations in `macaw` (building on top of the work in GaloisInc/elf-edit#45), this patch adds PLT stub heuristics for RISC-V binaries. I have added some test cases in `macaw-riscv-symbolic` which demonstrate that the basic idea works. Note that due to #416, these test cases will print warnings when loaded into `macaw`. These warnings are ultimately harmless, however, as the same relocations are loaded at the same addresses multiple times, which causes no change in behavior. Fixes #414.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we do not provide a
PLTStubInfo
value for RISC-V inmacaw-riscv
. I think it would be relatively straightforward to define one, however. Using binaries produced byriscv{32,64}-linux-musl-gcc
as a baseline, here is a first attempt:This is probably best done in conjunction with GaloisInc/elf-edit#36.
After we add
riscvPLTStubInfo
, make sure to use it here (and add a test case demonstrating that it works):macaw/macaw-riscv-symbolic/tests/Main.hs
Lines 150 to 155 in 1a2b928
The text was updated successfully, but these errors were encountered: