-
-
Notifications
You must be signed in to change notification settings - Fork 495
Add relocations for AVR #5790
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
base: dev
Are you sure you want to change the base?
Add relocations for AVR #5790
Conversation
0cf6efe to
9937a92
Compare
|
Should I continue making separate cases for the LDI_NEG relocations or use fall-through? It would look like this: case R_AVR_HI8_LDI_NEG:
val = -val;
/* fall through */
case R_AVR_HI8_LDI:
rz_buf_read_at(buf_patched, patch_addr, buf, nbytes);
offset = (val >> 8) & 0xFF;
opcode = rz_read_ble16(buf, big_endian) | rz_bits_spread(0xF0F, offset);
rz_write_ble16(buf, opcode, big_endian);
rz_buf_write_at(buf_patched, patch_addr, buf, nbytes);
break; |
5406411 to
d69182b
Compare
|
it's missing tests. you can upload binaries in our bin repo (check the tests/README.md) |
fall-thru are ok for these cases, just mark them with a comment like you did (also |
d69182b to
63ec33c
Compare
Does the binary need to test every type of relocation? If so, wouldn't that become tedious? |
63ec33c to
ae5146e
Compare
Yes please. Otherwise we can't confirm they work. |
ae5146e to
92ddf9f
Compare
in theory yes, but i know it might be problematic, so lets say it should cover more than 50% of them. you can use the Report of codecov to check the coverage. |
fac2a8c to
f62e706
Compare
|
I have made an object file with 28 (out of 36) types of relocations, but it won't be an "executable" binary. Is that fine? Also, didn't know where to ask this but should I just put the |
|
yes it is fine. maybe create a folder as |
|
I assume I need to add a script to test the relocations with the binary, but I can't figure out where it should go... |
|
rizinorg/rizin-testbins#238 has been approved, can this we go ahead with this PR? |
f62e706 to
b03cef2
Compare
Your checklist for this pull request
RZ_APIfunction and struct this PR changes. (No changes)RZ_API).Detailed description
Adds relocation conversion and patching for each relocation mapping for the architecture AVR.
Test plan
rz-bin -R test_avrClosing issues
Relates to #4699