valgrind/valgrind-3.13.0-arm-index-hardwire.patch
Mark Wielaard bd144c9e1a 3.13.0-4
- Add valgrind-3.13.0-arm-index-hardwire.patch (#1466017)
- Add valgrind-3.13.0-ucontext_t.patch
- Add valgrind-3.13.0-gdb-8-testfix.patch
- Add valgrind-3.13.0-disable-vgdb-child.patch
2017-06-29 20:34:46 +02:00

87 lines
2.3 KiB
Diff

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