glibc: Patch to work around missing features in LLVM's s390x assembler.
Revert this with LLVM 20.
This commit is contained in:
committed by
Andrew Kelley
parent
204107c499
commit
b230e4f598
@@ -61,7 +61,8 @@
|
||||
_start:
|
||||
cfi_startproc
|
||||
/* Mark r14 as undefined in order to stop unwinding here! */
|
||||
cfi_undefined (r14)
|
||||
/* zig patch: r14 -> %r14. revert with llvm 20. */
|
||||
cfi_undefined (%r14)
|
||||
|
||||
/* Check if the kernel provides highgprs facility if needed by
|
||||
the binary. */
|
||||
|
||||
3
lib/libc/glibc/sysdeps/s390/s390-32/start.S
vendored
3
lib/libc/glibc/sysdeps/s390/s390-32/start.S
vendored
@@ -60,7 +60,8 @@
|
||||
_start:
|
||||
cfi_startproc
|
||||
/* Mark r14 as undefined in order to stop unwinding here! */
|
||||
cfi_undefined (r14)
|
||||
/* zig patch: r14 -> %r14. revert with llvm 20. */
|
||||
cfi_undefined (%r14)
|
||||
|
||||
/* Check if the kernel provides highgprs facility if needed by
|
||||
the binary. */
|
||||
|
||||
3
lib/libc/glibc/sysdeps/s390/s390-64/crti.S
vendored
3
lib/libc/glibc/sysdeps/s390/s390-64/crti.S
vendored
@@ -67,7 +67,8 @@ _init:
|
||||
stg %r1,0(%r15)
|
||||
larl %r12,_GLOBAL_OFFSET_TABLE_
|
||||
#if PREINIT_FUNCTION_WEAK
|
||||
larl %r1,PREINIT_FUNCTION@GOTENT
|
||||
/* zig patch: GOTENT -> GOT. revert with llvm 20. */
|
||||
larl %r1,PREINIT_FUNCTION@GOT
|
||||
lg %r1,0(%r1)
|
||||
ltgr %r1,%r1
|
||||
je 1f
|
||||
|
||||
@@ -61,7 +61,8 @@
|
||||
_start:
|
||||
cfi_startproc
|
||||
/* Mark r14 as undefined in order to stop unwinding here! */
|
||||
cfi_undefined (r14)
|
||||
/* zig patch: r14 -> %r14. revert with llvm 20. */
|
||||
cfi_undefined (%r14)
|
||||
/* Load argc and argv from stack. */
|
||||
la %r4,8(%r15) # get argv
|
||||
lg %r3,0(%r15) # get argc
|
||||
@@ -85,7 +86,8 @@ _start:
|
||||
|
||||
/* Ok, now branch to the libc main routine. */
|
||||
#ifdef PIC
|
||||
larl %r2,main@GOTENT # load pointer to main
|
||||
/* zig patch: GOTENT -> GOT. revert with llvm 20. */
|
||||
larl %r2,main@GOT # load pointer to main
|
||||
lg %r2,0(%r2)
|
||||
brasl %r14,__libc_start_main@plt
|
||||
#else
|
||||
|
||||
9
lib/libc/glibc/sysdeps/s390/s390-64/start.S
vendored
9
lib/libc/glibc/sysdeps/s390/s390-64/start.S
vendored
@@ -60,7 +60,8 @@
|
||||
_start:
|
||||
cfi_startproc
|
||||
/* Mark r14 as undefined in order to stop unwinding here! */
|
||||
cfi_undefined (r14)
|
||||
/* zig patch: r14 -> %r14. revert with llvm 20. */
|
||||
cfi_undefined (%r14)
|
||||
/* Load argc and argv from stack. */
|
||||
la %r4,8(%r15) # get argv
|
||||
lg %r3,0(%r15) # get argc
|
||||
@@ -87,7 +88,8 @@ _start:
|
||||
# ifdef SHARED
|
||||
/* Used for dynamic linked position independent executable.
|
||||
=> Scrt1.o */
|
||||
larl %r2,main@GOTENT # load pointer to main
|
||||
/* zig patch: GOTENT -> GOT. revert with llvm 20. */
|
||||
larl %r2,main@GOT # load pointer to main
|
||||
lg %r2,0(%r2)
|
||||
# else
|
||||
/* Used for dynamic linked position dependent executable.
|
||||
@@ -119,7 +121,8 @@ _start:
|
||||
use of GOT relocations before __libc_start_main is called. */
|
||||
__wrap_main:
|
||||
cfi_startproc
|
||||
larl %r1,main@GOTENT # load pointer to main
|
||||
/* zig patch: GOTENT -> GOT. revert with llvm 20. */
|
||||
larl %r1,main@GOT # load pointer to main
|
||||
lg %r1,0(%r1)
|
||||
br %r1
|
||||
cfi_endproc
|
||||
|
||||
Reference in New Issue
Block a user