: Add R_SPARC_OLO10 relocation support.
PATCH 1/1 : Add R_SPARC_OLO10 relocation support.
2009-04-01 David S. Miller <[email protected]>
* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add support for R_SPARC_OLO10 relocations. Fix compile warning for R_SPARC_WDISP30 case.
--- kern/sparc64/dl.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
kern/sparc64/dl.c +9 -3
@@ -95,7 +95,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) + entsize * ELF64_R_SYM (rel->r_info)); value = sym->st_value + rel->r_addend; -switch (ELF64_R_TYPE (rel->r_info)) +switch (ELF64_R_TYPE (rel->r_info) &0xff ) {case R_SPARC_32 :/* 3 V-word32 */ if (value &0xFFFFFFFF00000000 )
@@ -105,8 +105,8 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)break ;case R_SPARC_WDISP30 :/* 7 V-disp30 */ if (((value - (Elf64_Addr ) addr) &0xFFFFFFFF00000000 ) && - ((value - (Elf64_Addr ) addr) &0xFFFFFFFF00000000 - !=0xFFFFFFFF00000000 )) + (((value - (Elf64_Addr ) addr) &0xFFFFFFFF00000000 ) + !=0xFFFFFFFF00000000 ))return grub_error (GRUB_ERR_BAD_MODULE ,"Displacement out of 30 bits range" ); *addr = (*addr & 0xC0000000) |
@@ -125,6 +125,12 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)case R_SPARC_64 :/* 32 V-xwords64 */ *(Elf64_Xword *) addr = value;break ; +case R_SPARC_OLO10 : + *addr = (*addr & ~0x1fff ) + | (((value &0x3ff ) + + (ELF64_R_TYPE (rel->r_info) >>8 )) + &0x1fff ); +break ;default : return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "This relocation (%d) is not implemented yet",
Signature · 1 line
1.6.2.1.222.g570cc
From: David Miller <[email protected]>
Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)
Quoted 5 lines
2009-04-01 David S. Miller <[email protected]>
*
kern/sparc64/dl.c(grub_arch_dl_relocate_symbols): Add support forR_SPARC_OLO10relocations. Fix compile warning forR_SPARC_WDISP30case.
Ping?
Quoted 10 lines · David Miller
From: David Miller <[email protected]>
Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)Quoted 5 lines
2009-04-01 David S. Miller <[email protected]>
*
kern/sparc64/dl.c(grub_arch_dl_relocate_symbols): Add support forR_SPARC_OLO10relocations. Fix compile warning forR_SPARC_WDISP30case.Ping?
I don't think there is anyone to review your SPARC fixes. I tend to trust you without looking as long as other code is not affected.
Signature · 2 lines
Regards, Pavel Roskin
From: Pavel Roskin <[email protected]>
Date: Tue, 07 Apr 2009 18:06:15 -0400
Quoted 6 lines · David Miller
Quoted 5 lines
From: David Miller <[email protected]>
Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)Quoted 2 lines
2009-04-01 David S. Miller <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
*
kern/sparc64/dl.c(grub_arch_dl_relocate_symbols): Add support forR_SPARC_OLO10relocations. Fix compile warning forR_SPARC_WDISP30case.Ping?
I don't think there is anyone to review your SPARC fixes. I tend to trust you without looking as long as other code is not affected.
Ok.