Blob Blame History Raw
diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c
index b8cc022..d54cae7 100644
--- a/coregrind/m_redir.c
+++ b/coregrind/m_redir.c
@@ -1485,6 +1485,17 @@ void VG_(redir_initialise) ( void )
          (Addr)&VG_(arm_linux_REDIR_FOR_strcmp),
          complain_about_stripped_glibc_ldso
       );
+      /* index */
+      add_hardwired_spec(
+         "ld-linux.so.3", "index",
+         (Addr)&VG_(arm_linux_REDIR_FOR_index),
+         complain_about_stripped_glibc_ldso
+      );
+      add_hardwired_spec(
+         "ld-linux-armhf.so.3", "index",
+         (Addr)&VG_(arm_linux_REDIR_FOR_index),
+         complain_about_stripped_glibc_ldso
+      );
    }
 
 #  elif defined(VGP_arm64_linux)
diff --git a/coregrind/m_trampoline.S b/coregrind/m_trampoline.S
index a532071..0488b54 100644
--- a/coregrind/m_trampoline.S
+++ b/coregrind/m_trampoline.S
@@ -625,26 +625,26 @@ VG_(arm_linux_REDIR_FOR_strlen):
 	bx	lr
 	UD2_4
 
-//.global VG_(arm_linux_REDIR_FOR_index)
-//VG_(arm_linux_REDIR_FOR_index):
-//	ldrb	r3, [r0, #0]	@ zero_extendqisi2
-//	and	r1, r1, #255
-//	cmp	r3, r1
-//	@ lr needed for prologue
-//	bne	.L9
-//	bx	lr
-//.L12:
-//	ldrb	r3, [r0, #1]!	@ zero_extendqisi2
-//	cmp	r3, r1
-//	beq	.L11
-//.L9:
-//	cmp	r3, #0
-//	bne	.L12
-//	mov	r0, #0
-//	bx	lr
-//.L11:
-//	bx	lr
-//	UD2_4
+.global VG_(arm_linux_REDIR_FOR_index)
+VG_(arm_linux_REDIR_FOR_index):
+	ldrb	r3, [r0, #0]	@ zero_extendqisi2
+	and	r1, r1, #255
+	cmp	r3, r1
+	@ lr needed for prologue
+	bne	.L9
+	bx	lr
+.L12:
+	ldrb	r3, [r0, #1]!	@ zero_extendqisi2
+	cmp	r3, r1
+	beq	.L11
+.L9:
+	cmp	r3, #0
+	bne	.L12
+	mov	r0, #0
+	bx	lr
+.L11:
+	bx	lr
+	UD2_4
 
 .global VG_(arm_linux_REDIR_FOR_memcpy)
 VG_(arm_linux_REDIR_FOR_memcpy):
diff --git a/coregrind/pub_core_trampoline.h b/coregrind/pub_core_trampoline.h
index 3a9bafe..e29427d 100644
--- a/coregrind/pub_core_trampoline.h
+++ b/coregrind/pub_core_trampoline.h
@@ -100,7 +100,7 @@ extern Addr VG_(ppctoc_magic_redirect_return_stub);
 extern Addr  VG_(arm_linux_SUBST_FOR_sigreturn);
 extern Addr  VG_(arm_linux_SUBST_FOR_rt_sigreturn);
 extern UInt  VG_(arm_linux_REDIR_FOR_strlen)( void* );
-//extern void* VG_(arm_linux_REDIR_FOR_index) ( void*, Int );
+extern void* VG_(arm_linux_REDIR_FOR_index) ( void*, Int );
 extern void* VG_(arm_linux_REDIR_FOR_memcpy)( void*, void*, Int );
 extern void* VG_(arm_linux_REDIR_FOR_strcmp)( void*, void* );
 #endif