Explorar o código

fix ld-behavior-dependent crash in ppc64 ldso startup

the 32-bit pc-relative address for stage 2 of dynamic linker entry was
wrongly loaded with a zero-extending load instead of sign-extending
load, resulting in an invalid jump if the offset happened to be
negative, which depends on the linker's ordering of text sections.
Rich Felker %!s(int64=8) %!d(string=hai) anos
pai
achega
fc85fb3860
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/powerpc64/reloc.h

+ 1 - 1
arch/powerpc64/reloc.h

@@ -27,6 +27,6 @@
 	"	bl 1f \n" \
 	"	.long " #sym "-. \n" \
 	"1:	mflr %1 \n" \
-	"	lwz %0, 0(%1) \n" \
+	"	lwa %0, 0(%1) \n" \
 	"	add %0, %0, %1 \n" \
 	: "=r"(*(fp)), "=r"((long){0}) : : "memory", "lr" )