Use PLT for PIC call to _exit to avoid text reloc in the shared library.
Add .size directive.
This commit is contained in:
parent
a92c062160
commit
3259b3637a
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: __clone.S,v 1.4 2006/01/05 18:20:29 uwe Exp $ */
|
/* $NetBSD: __clone.S,v 1.5 2006/01/05 19:28:50 uwe Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 Tsubai Masanari. All rights reserved.
|
* Copyright (c) 2001 Tsubai Masanari. All rights reserved.
|
||||||
|
@ -59,8 +59,16 @@ ENTRY(__clone)
|
||||||
mov r7, r4
|
mov r7, r4
|
||||||
|
|
||||||
mov.l .L__exit, r1
|
mov.l .L__exit, r1
|
||||||
|
#ifdef PIC
|
||||||
|
mov r0, r4
|
||||||
|
mov.l .L_got, r12 /* PIC_PROLOGUE_NOSAVE(.L_got) */
|
||||||
|
mova .L_got, r0 /* expanded to fill the delay slot */
|
||||||
1: JUMP r1
|
1: JUMP r1
|
||||||
|
add r0, r12
|
||||||
|
#else
|
||||||
|
JUMP r1
|
||||||
mov r0, r4
|
mov r0, r4
|
||||||
|
#endif
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
|
|
||||||
inval:
|
inval:
|
||||||
|
@ -75,9 +83,9 @@ err:
|
||||||
nop
|
nop
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
.L_SYS___clone:
|
.L_SYS___clone: .long SYS___clone
|
||||||
.long SYS___clone
|
|
||||||
.L__exit:
|
.L_got: PIC_GOT_DATUM
|
||||||
CALL_DATUM_LOCAL(_C_LABEL(_exit), 1b)
|
.L__exit: CALL_DATUM(_C_LABEL(_exit), 1b)
|
||||||
.L_cerror:
|
.L_cerror: CALL_DATUM_LOCAL(cerror, 2b)
|
||||||
CALL_DATUM_LOCAL(cerror, 2b)
|
SET_ENTRY_SIZE(__clone)
|
||||||
|
|
Loading…
Reference in New Issue