Skip to content

Commit

Permalink
* grub-core/kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Check
Browse files Browse the repository at this point in the history
	range of R_SPARC_HI22.
	Implement R_SPARC_LM22.
  • Loading branch information
phcoder committed Dec 9, 2013
1 parent 7b54b62 commit 21eee75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2013-12-09 Vladimir Serbinenko <[email protected]>

* grub-core/kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Check
range of R_SPARC_HI22.
Implement R_SPARC_LM22.

2013-12-09 Vladimir Serbinenko <[email protected]>

* grub-core/kern/powerpc/dl_helper.c (grub_arch_dl_get_tramp_got_size):
Expand Down
4 changes: 4 additions & 0 deletions grub-core/kern/sparc64/dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
*addr = (*addr & 0xFFFFFC00) | ((value >> 32) & 0x3FF);
break;
case R_SPARC_HI22: /* 9 V-imm22 */
if (value >> 32)
return grub_error (GRUB_ERR_BAD_MODULE,
"address out of 32 bits range");
case R_SPARC_LM22:
*addr = (*addr & 0xFFC00000) | ((value >> 10) & 0x3FFFFF);
break;
case R_SPARC_LO10: /* 12 T-simm13 */
Expand Down

0 comments on commit 21eee75

Please sign in to comment.