mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* sysdeps/alpha/dl-machine.h (RTLD_START): Fix top-of-stack backtrace. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/alpha/elf/start.S: Likewise. Remove pointless allocation. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use standard ldgp entry sequence and explicit relocs. Add unwind info for sigreturn and rt_sigreturn. * configure.in (libc_cv_asm_cfi_directives): Test .cfi_remember_state. * configure: Regenerate.
* sysdeps/alpha/dl-machine.h (RTLD_START): Fix top-of-stack backtrace. * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise. * sysdeps/alpha/elf/start.S: Likewise. Remove pointless allocation. * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use standard ldgp entry sequence and explicit relocs. Add unwind info for sigreturn and rt_sigreturn. * configure.in (libc_cv_asm_cfi_directives): Test .cfi_remember_state. * configure: Regenerate.
This commit is contained in:
parent
a56e4568df
commit
f212e8dcf8
@ -1,5 +1,14 @@
|
|||||||
2003-06-04 Richard Henderson <rth@redhat.com>
|
2003-06-04 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/alpha/dl-machine.h (RTLD_START): Fix top-of-stack backtrace.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
|
||||||
|
* sysdeps/alpha/elf/start.S: Likewise. Remove pointless allocation.
|
||||||
|
* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Use standard ldgp
|
||||||
|
entry sequence and explicit relocs. Add unwind info for sigreturn
|
||||||
|
and rt_sigreturn.
|
||||||
|
* configure.in (libc_cv_asm_cfi_directives): Test .cfi_remember_state.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/alpha/syscalls.list (semtimedop): New.
|
* sysdeps/unix/sysv/linux/alpha/syscalls.list (semtimedop): New.
|
||||||
Annotate some parameters.
|
Annotate some parameters.
|
||||||
* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_semtimedop): New.
|
* sysdeps/unix/sysv/linux/alpha/sysdep.h (__NR_semtimedop): New.
|
||||||
|
1
configure
vendored
1
configure
vendored
@ -5736,6 +5736,7 @@ else
|
|||||||
.type func,@function
|
.type func,@function
|
||||||
func:
|
func:
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
|
.cfi_remember_state
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
EOF
|
EOF
|
||||||
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
|
||||||
|
@ -1529,6 +1529,7 @@ cat > conftest.s <<EOF
|
|||||||
.type func,@function
|
.type func,@function
|
||||||
func:
|
func:
|
||||||
.cfi_startproc
|
.cfi_startproc
|
||||||
|
.cfi_remember_state
|
||||||
.cfi_endproc
|
.cfi_endproc
|
||||||
EOF
|
EOF
|
||||||
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
||||||
|
@ -303,6 +303,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
|
|||||||
.globl _start \n\
|
.globl _start \n\
|
||||||
.ent _start \n\
|
.ent _start \n\
|
||||||
_start: \n\
|
_start: \n\
|
||||||
|
.frame $31,0,$31,0 \n\
|
||||||
br $gp, 0f \n\
|
br $gp, 0f \n\
|
||||||
0: ldgp $gp, 0($gp) \n\
|
0: ldgp $gp, 0($gp) \n\
|
||||||
.prologue 0 \n\
|
.prologue 0 \n\
|
||||||
@ -314,7 +315,7 @@ _start: \n\
|
|||||||
.globl _dl_start_user \n\
|
.globl _dl_start_user \n\
|
||||||
.ent _dl_start_user \n\
|
.ent _dl_start_user \n\
|
||||||
_dl_start_user: \n\
|
_dl_start_user: \n\
|
||||||
.frame $30,0,$31,0 \n\
|
.frame $31,0,$31,0 \n\
|
||||||
.prologue 0 \n\
|
.prologue 0 \n\
|
||||||
/* Save the user entry point address in s0. */ \n\
|
/* Save the user entry point address in s0. */ \n\
|
||||||
mov $0, $9 \n\
|
mov $0, $9 \n\
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
/* Startup code for Alpha/ELF.
|
/* Startup code for Alpha/ELF.
|
||||||
Copyright (C) 1993,1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
|
Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
|
||||||
|
Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Richard Henderson <rth@tamu.edu>
|
Contributed by Richard Henderson <rth@tamu.edu>
|
||||||
|
|
||||||
@ -26,8 +27,7 @@
|
|||||||
.ent _start, 0
|
.ent _start, 0
|
||||||
.type _start,@function
|
.type _start,@function
|
||||||
_start:
|
_start:
|
||||||
.frame fp, 0, zero
|
.frame $31, 0, $31
|
||||||
mov zero, fp
|
|
||||||
br gp, 1f
|
br gp, 1f
|
||||||
1: ldgp gp, 0(gp)
|
1: ldgp gp, 0(gp)
|
||||||
subq sp, 16, sp
|
subq sp, 16, sp
|
||||||
@ -65,6 +65,5 @@ weak_alias(_start, __start)
|
|||||||
.data
|
.data
|
||||||
.globl __data_start
|
.globl __data_start
|
||||||
__data_start:
|
__data_start:
|
||||||
.long 0
|
|
||||||
.weak data_start
|
.weak data_start
|
||||||
data_start = __data_start
|
data_start = __data_start
|
||||||
|
@ -49,13 +49,19 @@
|
|||||||
|
|
||||||
/* Makros to generate eh_frame unwind information. */
|
/* Makros to generate eh_frame unwind information. */
|
||||||
# ifdef HAVE_ASM_CFI_DIRECTIVES
|
# ifdef HAVE_ASM_CFI_DIRECTIVES
|
||||||
# define cfi_startproc .cfi_startproc
|
# define cfi_startproc .cfi_startproc
|
||||||
# define cfi_endproc .cfi_endproc
|
# define cfi_endproc .cfi_endproc
|
||||||
# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
|
# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
|
||||||
# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
|
# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
|
||||||
# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
|
# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
|
||||||
# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
|
# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
|
||||||
# define cfi_offset(reg, off) .cfi_offset reg, off
|
# define cfi_offset(reg, off) .cfi_offset reg, off
|
||||||
|
# define cfi_register(r1, r2) .cfi_register r1, r2
|
||||||
|
# define cfi_return_column(reg) .cfi_return_column reg
|
||||||
|
# define cfi_restore(reg) .cfi_restore reg
|
||||||
|
# define cfi_undefined(reg) .cfi_undefined reg
|
||||||
|
# define cfi_remember_state .cfi_remember_state
|
||||||
|
# define cfi_restore_state .cfi_restore_state
|
||||||
# else
|
# else
|
||||||
# define cfi_startproc
|
# define cfi_startproc
|
||||||
# define cfi_endproc
|
# define cfi_endproc
|
||||||
@ -64,6 +70,12 @@
|
|||||||
# define cfi_def_cfa_offset(off)
|
# define cfi_def_cfa_offset(off)
|
||||||
# define cfi_adjust_cfa_offset(off)
|
# define cfi_adjust_cfa_offset(off)
|
||||||
# define cfi_offset(reg, off)
|
# define cfi_offset(reg, off)
|
||||||
|
# define cfi_register(r1, r2)
|
||||||
|
# define cfi_return_column(reg)
|
||||||
|
# define cfi_restore(reg)
|
||||||
|
# define cfi_undefined(reg)
|
||||||
|
# define cfi_remember_state
|
||||||
|
# define cfi_restore_state
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#else /* ! ASSEMBLER */
|
#else /* ! ASSEMBLER */
|
||||||
@ -82,6 +94,18 @@
|
|||||||
".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
|
".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
|
||||||
# define CFI_OFFSET(reg, off) \
|
# define CFI_OFFSET(reg, off) \
|
||||||
".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
|
".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
|
||||||
|
# define CFI_REGISTER(r1, r2) \
|
||||||
|
".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
|
||||||
|
# define CFI_RETURN_COLUMN(reg) \
|
||||||
|
".cfi_return_column " CFI_STRINGIFY(reg)
|
||||||
|
# define CFI_RESTORE(reg) \
|
||||||
|
".cfi_restore " CFI_STRINGIFY(reg)
|
||||||
|
# define CFI_UNDEFINED(reg) \
|
||||||
|
".cfi_undefined " CFI_STRINGIFY(reg)
|
||||||
|
# define CFI_REMEMBER_STATE \
|
||||||
|
".cfi_remember_state"
|
||||||
|
# define CFI_RESTORE_STATE \
|
||||||
|
".cfi_restore_state"
|
||||||
# else
|
# else
|
||||||
# define CFI_STARTPROC
|
# define CFI_STARTPROC
|
||||||
# define CFI_ENDPROC
|
# define CFI_ENDPROC
|
||||||
@ -90,6 +114,12 @@
|
|||||||
# define CFI_DEF_CFA_OFFSET(off)
|
# define CFI_DEF_CFA_OFFSET(off)
|
||||||
# define CFI_ADJUST_CFA_OFFSET(off)
|
# define CFI_ADJUST_CFA_OFFSET(off)
|
||||||
# define CFI_OFFSET(reg, off)
|
# define CFI_OFFSET(reg, off)
|
||||||
|
# define CFI_REGISTER(r1, r2)
|
||||||
|
# define CFI_RETURN_COLUMN(reg)
|
||||||
|
# define CFI_RESTORE(reg)
|
||||||
|
# define CFI_UNDEFINED(reg)
|
||||||
|
# define CFI_REMEMBER_STATE
|
||||||
|
# define CFI_RESTORE_STATE
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLER__ */
|
#endif /* __ASSEMBLER__ */
|
||||||
|
@ -83,8 +83,7 @@ $error:
|
|||||||
|
|
||||||
.ent thread_start
|
.ent thread_start
|
||||||
thread_start:
|
thread_start:
|
||||||
.frame fp,0,zero,0
|
.frame zero,0,zero,0
|
||||||
mov zero,fp
|
|
||||||
.prologue 0
|
.prologue 0
|
||||||
|
|
||||||
/* Load up the arguments. */
|
/* Load up the arguments. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
/* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Richard Henderson <rth@cygnus.com>, 1998
|
Contributed by Richard Henderson <rth@cygnus.com>, 1998
|
||||||
|
|
||||||
@ -28,55 +28,92 @@
|
|||||||
|
|
||||||
#ifdef __NR_rt_sigaction
|
#ifdef __NR_rt_sigaction
|
||||||
.text
|
.text
|
||||||
|
|
||||||
ENTRY(__syscall_rt_sigaction)
|
ENTRY(__syscall_rt_sigaction)
|
||||||
.frame sp,0,ra,0
|
.frame sp,0,ra,0
|
||||||
#ifdef PROF
|
|
||||||
ldgp gp,0(pv)
|
ldgp gp,0(pv)
|
||||||
|
#ifdef PROF
|
||||||
.set noat
|
.set noat
|
||||||
lda AT, _mcount
|
lda AT, _mcount
|
||||||
jsr AT, (AT), _mcount
|
jsr AT, (AT), _mcount
|
||||||
.set at
|
.set at
|
||||||
#endif
|
#endif
|
||||||
/* Indicate non-standard use of our PV. */
|
.prologue 1
|
||||||
.prologue 2
|
|
||||||
|
|
||||||
beq a1, 0f
|
beq a1, 0f
|
||||||
ldl t0, 8(a1) # sa_flags
|
ldl t0, 8(a1) # sa_flags
|
||||||
lda a4, sigreturn-__syscall_rt_sigaction(pv)
|
ldah a4, sigreturn(gp) !gprelhigh
|
||||||
lda t1, rt_sigreturn-__syscall_rt_sigaction(pv)
|
ldah t1, rt_sigreturn(gp) !gprelhigh
|
||||||
and t0, 0x00000040, t0 # SA_SIGINFO
|
lda a4, sigreturn(a4) !gprellow
|
||||||
|
lda t1, rt_sigreturn(a4) !gprellow
|
||||||
|
and t0, 0x00000040, t0 # SA_SIGINFO
|
||||||
cmovne t0, t1, a4
|
cmovne t0, t1, a4
|
||||||
0: ldi v0,__NR_rt_sigaction
|
0: ldi v0, __NR_rt_sigaction
|
||||||
callsys
|
callsys
|
||||||
bne a3,1f
|
bne a3, SYSCALL_ERROR_LABEL
|
||||||
ret
|
ret
|
||||||
|
|
||||||
1:
|
PSEUDO_END(__syscall_rt_sigaction)
|
||||||
#ifndef PROF
|
|
||||||
br gp,2f
|
|
||||||
2: ldgp gp,0(gp)
|
|
||||||
#endif
|
|
||||||
SYSCALL_ERROR_HANDLER
|
|
||||||
|
|
||||||
END(__syscall_rt_sigaction)
|
/* To enable unwinding through the signal frame without special hackery
|
||||||
|
elsewhere, describe the entire struct sigcontext with unwind info.
|
||||||
|
Note that we begin the unwind info one instruction before the start
|
||||||
|
of the function; the unwinder will subtract one from the return address
|
||||||
|
attempting to find the call instruction that led us here, since we
|
||||||
|
didn't get here via a normal call. */
|
||||||
|
|
||||||
.align 5
|
.macro SIGCONTEXT_REGS_I base, from=0
|
||||||
.ent sigreturn
|
cfi_offset (\from, \base + (4 + \from) * 8)
|
||||||
sigreturn:
|
.if 30-\from
|
||||||
.prologue 0
|
SIGCONTEXT_REGS_I \base, "(\from+1)"
|
||||||
mov sp,a0
|
.endif
|
||||||
ldi v0,__NR_sigreturn
|
.endm
|
||||||
callsys
|
|
||||||
.end sigreturn
|
.macro SIGCONTEXT_REGS_F base, from=32
|
||||||
|
cfi_offset (\from, \base + (4 + 1 + \from) * 8)
|
||||||
|
.if 62-\from
|
||||||
|
SIGCONTEXT_REGS_F \base, "(\from+1)"
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
|
.macro SIGCONTEXT_REGS base
|
||||||
|
SIGCONTEXT_REGS_I \base
|
||||||
|
SIGCONTEXT_REGS_F \base
|
||||||
|
cfi_offset (63, \base + (4 + 32 + 1 + 32) * 8)
|
||||||
|
cfi_offset (64, \base + 2 * 8)
|
||||||
|
.endm
|
||||||
|
|
||||||
.align 4
|
.align 4
|
||||||
.ent rt_sigreturn
|
nop
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
|
||||||
|
cfi_startproc
|
||||||
|
cfi_return_column (64)
|
||||||
|
SIGCONTEXT_REGS -648
|
||||||
|
cfi_def_cfa_offset (648)
|
||||||
|
nop
|
||||||
|
sigreturn:
|
||||||
|
mov sp, a0
|
||||||
|
ldi v0, __NR_sigreturn
|
||||||
|
callsys
|
||||||
|
cfi_endproc
|
||||||
|
.size sigreturn, .-sigreturn
|
||||||
|
.type sigreturn, @function
|
||||||
|
|
||||||
|
cfi_startproc
|
||||||
|
cfi_return_column (64)
|
||||||
|
SIGCONTEXT_REGS -648
|
||||||
|
cfi_def_cfa_offset (176 + 648)
|
||||||
|
nop
|
||||||
rt_sigreturn:
|
rt_sigreturn:
|
||||||
.prologue 0
|
|
||||||
mov sp,a0
|
mov sp,a0
|
||||||
ldi v0,__NR_rt_sigreturn
|
ldi v0,__NR_rt_sigreturn
|
||||||
callsys
|
callsys
|
||||||
.end rt_sigreturn
|
cfi_endproc
|
||||||
|
.size rt_sigreturn, .-rt_sigreturn
|
||||||
|
.type rt_sigreturn, @function
|
||||||
|
|
||||||
#else
|
#else
|
||||||
ENTRY(__syscall_rt_sigaction)
|
ENTRY(__syscall_rt_sigaction)
|
||||||
ldgp $29,0($27)
|
ldgp $29,0($27)
|
||||||
|
Loading…
Reference in New Issue
Block a user