Skip to content

Commit

Permalink
update relo_cur_src_vmaddr for thumb
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 authored Dec 21, 2023
1 parent d2132de commit 066e163
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ addr_t relo_cur_src_vmaddr(relo_ctx_t* ctx) {
return ctx->src_vmaddr + relocated_len + ARM_PC_OFFSET;
}
else {
return ctx->src_vmaddr + relocated_len + Thumb_PC_OFFSET;
// Geode bugfix
// it is not always relocated_len for thumb,
// instead it takes the size as 2 and pads to 4
return (ctx->src_vmaddr + 4 + Thumb_PC_OFFSET) & 0xfffffffc;
}
}

Expand Down

0 comments on commit 066e163

Please sign in to comment.