mirror of
git://git.musl-libc.org/musl
synced 2024-12-12 09:45:45 +00:00
5be920e910
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.
14 lines
438 B
C
14 lines
438 B
C
#define LDSO_ARCH "s390x"
|
|
|
|
#define REL_SYMBOLIC R_390_64
|
|
#define REL_GOT R_390_GLOB_DAT
|
|
#define REL_PLT R_390_JMP_SLOT
|
|
#define REL_RELATIVE R_390_RELATIVE
|
|
#define REL_COPY R_390_COPY
|
|
#define REL_DTPMOD R_390_TLS_DTPMOD
|
|
#define REL_DTPOFF R_390_TLS_DTPOFF
|
|
#define REL_TPOFF R_390_TLS_TPOFF
|
|
|
|
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
|
"lgr %%r15,%1; br %0" : : "a"(pc), "r"(sp) : "memory" )
|