diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-04-20 18:17:48 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-04-20 18:17:48 -0400 |
commit | 4bf10ebf66e0c675c549032fc72915beb92d1312 (patch) | |
tree | 1fe9b116d388acec09cadbe0ebc0901226fc0a9e /arch/x32 | |
parent | 60ed988fd6c67b489d7cc186ecaa9db4e5c25b8c (diff) | |
download | musl-4bf10ebf66e0c675c549032fc72915beb92d1312.tar.gz musl-4bf10ebf66e0c675c549032fc72915beb92d1312.tar.xz musl-4bf10ebf66e0c675c549032fc72915beb92d1312.zip |
fix breakage in x32 dynamic linker due to mismatching register size
the jmp instruction requires a 64-bit register, so cast the desired PC address up to uint64_t, going through uintptr_t to ensure that it's zero-extended rather than possibly sign-extended.
Diffstat (limited to 'arch/x32')
-rw-r--r-- | arch/x32/reloc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x32/reloc.h b/arch/x32/reloc.h index 7c72d266..574f44a7 100644 --- a/arch/x32/reloc.h +++ b/arch/x32/reloc.h @@ -23,4 +23,4 @@ #define REL_TPOFF R_X86_64_TPOFF64 #define CRTJMP(pc,sp) __asm__ __volatile__( \ - "mov %1,%%esp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" ) + "mov %1,%%esp ; jmp *%0" : : "r"((uint64_t)(uintptr_t)pc), "r"(sp) : "memory" ) |