[PATCH] ldso/ARC: fix DT_RELACOUNT handling

Vineet Gupta <[email protected]> Fri, 20 May 2016 12:26:27 +0530
Newsgroups gmane.comp.lib.uclibc.general
Message-ID <[email protected]>
From: Cupertino Miranda <[email protected]>

Wih new bintuils supporting DT_RELACOUNT, ldso was crashing as it was
parsing relocs incorrectly.

Apparently that code ran for first time and was never tested.

Signed-off-by: Vineet Gupta <[email protected]>
---
 ldso/ldso/arc/dl-sysdep.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
index b6bda9d14691..caece997d254 100644
--- a/ldso/ldso/arc/dl-sysdep.h
+++ b/ldso/ldso/arc/dl-sysdep.h
@@ -166,7 +166,7 @@ static __always_inline void
 elf_machine_relative (Elf32_Addr load_off, const Elf32_Addr rel_addr,
 		      Elf32_Word relative_count)
 {
-	 Elf32_Rel * rpnt = (void *) rel_addr;
+	 Elf32_Rela * rpnt = (void *) rel_addr;
 	--rpnt;
 	do {
 		Elf32_Addr *const reloc_addr = (void *) (load_off + (++rpnt)->r_offset);
-- 
2.5.0