Skip to contentSkip to conversation

sparc32: Enable the relocation target R_SPARC_DISP32 for sparc32

PATCH Superseded Andreas Larsson 2 participants 3 messages Sep 17, 2012 SPARC + UltraSPARC (sparc/sparc64)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Andreas Larsson

author maintainer
#0 lore raw

PATCH 1/1 sparc32: Enable the relocation target R_SPARC_DISP32 for sparc32

GNU Binutils 2.20.1 generates .eh_frame sections that uses R_SPARC_DISP32.

---
 arch/sparc/kernel/module.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
arch/sparc/kernel/module.c +5 -5
index 15e0a16..f42ab3e 100644
@@ -116,6 +116,11 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
 		v = sym->st_value + rel[i].r_addend;
 
 		switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
+
+		case R_SPARC_DISP32:
+			v -= (Elf_Addr) location;
+			*loc32 = v;
+			break;
 #ifdef CONFIG_SPARC64
 		case R_SPARC_64:
 			location[0] = v >> 56;
@@ -128,11 +133,6 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
 			location[7] = v >>  0;
 			break;
 
-		case R_SPARC_DISP32:
-			v -= (Elf_Addr) location;
-			*loc32 = v;
-			break;
-
 		case R_SPARC_WDISP19:
 			v -= (Elf_Addr) location;
 			*loc32 = (*loc32 & ~0x7ffff) |
Signature · 1 line
1.7.0.4
maintainer
#1 lore raw

From: Andreas Larsson <[email protected]>
Date: Mon, 17 Sep 2012 17:22:28 +0200

Quoted 12 lines

GNU Binutils 2.20.1 generates .eh_frame sections that uses R_SPARC_DISP32.

---
 arch/sparc/kernel/module.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
arch/sparc/kernel/module.c +0 -0
index 15e0a16..f42ab3e 100644

arch/sparc/kernel/module.c int apply_relocate_add(Elf_Shdr *sechdrs, · line 119

Quoted 4 lines
arch/sparc/kernel/module.c +1 -0
@@ -116,6 +116,11 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
 		v = sym->st_value + rel[i].r_addend;
 
 		switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
+

Please get rid of the empty line and resubmit, thanks.

maintainer
#2 lore raw
In reply to Andreas Larsson

From: Andreas Larsson <[email protected]>
Date: Mon, 17 Sep 2012 17:22:28 +0200

Quoted 12 lines

GNU Binutils 2.20.1 generates .eh_frame sections that uses R_SPARC_DISP32.

---
 arch/sparc/kernel/module.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
arch/sparc/kernel/module.c +0 -0
index 15e0a16..f42ab3e 100644

arch/sparc/kernel/module.c int apply_relocate_add(Elf_Shdr *sechdrs, · line 119

Quoted 4 lines
arch/sparc/kernel/module.c +1 -0
@@ -116,6 +116,11 @@ int apply_relocate_add(Elf_Shdr *sechdrs,
 		v = sym->st_value + rel[i].r_addend;
 
 		switch (ELF_R_TYPE(rel[i].r_info) & 0xff) {
+

I said to get rid of this empty line, please follow the feedback you were given. If you continue to ignore my feedback, I will completely ignore your submissions.