소스 검색

s390x: don't allow br r0 in CRTJMP asm

The instruction encoding that would be "br %r0" is not actually a
branch to r0, but instead a nop/memory-barrier. gcc 14 has been found
to choose r0 for the "r"(pc) constraint, breaking CRTJMP.

This patch adjusts the inline assembly constraints and marks "pc" as
address ("a"), which disallows usage of r0.
Stefan Liebler 1 개월 전
부모
커밋
5be920e910
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      arch/s390x/reloc.h

+ 1 - 1
arch/s390x/reloc.h

@@ -10,4 +10,4 @@
 #define REL_TPOFF       R_390_TLS_TPOFF
 
 #define CRTJMP(pc,sp) __asm__ __volatile__( \
-	"lgr %%r15,%1; br %0" : : "r"(pc), "r"(sp) : "memory" )
+	"lgr %%r15,%1; br %0" : : "a"(pc), "r"(sp) : "memory" )