All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Add R_SPARC_OLO10 relocation support.
@ 2009-04-02  0:16 David Miller
  2009-04-07 21:59 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-04-02  0:16 UTC (permalink / raw)
  To: grub-devel


2009-04-01  David S. Miller  <davem@davemloft.net>

	* 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(-)

diff --git a/kern/sparc64/dl.c b/kern/sparc64/dl.c
index 28ea352..29b8c8a 100644
--- a/kern/sparc64/dl.c
+++ b/kern/sparc64/dl.c
@@ -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",
-- 
1.6.2.1.222.g570cc




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH]: Add R_SPARC_OLO10 relocation support.
  2009-04-02  0:16 [PATCH]: Add R_SPARC_OLO10 relocation support David Miller
@ 2009-04-07 21:59 ` David Miller
  2009-04-07 22:06   ` Pavel Roskin
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-04-07 21:59 UTC (permalink / raw)
  To: grub-devel

From: David Miller <davem@davemloft.net>
Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)

> 2009-04-01  David S. Miller  <davem@davemloft.net>
> 
> 	* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
> 	support for R_SPARC_OLO10 relocations.  Fix compile warning for
> 	R_SPARC_WDISP30 case.

Ping?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: Add R_SPARC_OLO10 relocation support.
  2009-04-07 21:59 ` David Miller
@ 2009-04-07 22:06   ` Pavel Roskin
  2009-04-07 22:18     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2009-04-07 22:06 UTC (permalink / raw)
  To: The development of GRUB 2

On Tue, 2009-04-07 at 14:59 -0700, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)
> 
> > 2009-04-01  David S. Miller  <davem@davemloft.net>
> > 
> > 	* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
> > 	support for R_SPARC_OLO10 relocations.  Fix compile warning for
> > 	R_SPARC_WDISP30 case.
> 
> 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.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH]: Add R_SPARC_OLO10 relocation support.
  2009-04-07 22:06   ` Pavel Roskin
@ 2009-04-07 22:18     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-04-07 22:18 UTC (permalink / raw)
  To: grub-devel

From: Pavel Roskin <proski@gnu.org>
Date: Tue, 07 Apr 2009 18:06:15 -0400

> On Tue, 2009-04-07 at 14:59 -0700, David Miller wrote:
>> From: David Miller <davem@davemloft.net>
>> Date: Wed, 01 Apr 2009 17:16:08 -0700 (PDT)
>> 
>> > 2009-04-01  David S. Miller  <davem@davemloft.net>
>> > 
>> > 	* kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
>> > 	support for R_SPARC_OLO10 relocations.  Fix compile warning for
>> > 	R_SPARC_WDISP30 case.
>> 
>> 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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-07 22:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02  0:16 [PATCH]: Add R_SPARC_OLO10 relocation support David Miller
2009-04-07 21:59 ` David Miller
2009-04-07 22:06   ` Pavel Roskin
2009-04-07 22:18     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.