Deleted Added
full compact
rtld_start.S (117211) rtld_start.S (130661)
1/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
2
3/*-
4 * Copyright (c) 2001 Jake Burkholder.
5 * Copyright (c) 2000 Eduardo Horvath.
6 * Copyright (c) 1999 The NetBSD Foundation, Inc.
7 * All rights reserved.
8 *

--- 23 unchanged lines hidden (view full) ---

32 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
1/* $NetBSD: rtld_start.S,v 1.5 2001/08/14 22:17:48 eeh Exp $ */
2
3/*-
4 * Copyright (c) 2001 Jake Burkholder.
5 * Copyright (c) 2000 Eduardo Horvath.
6 * Copyright (c) 1999 The NetBSD Foundation, Inc.
7 * All rights reserved.
8 *

--- 23 unchanged lines hidden (view full) ---

32 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
33 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
34 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
35 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
36 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
40 * $FreeBSD: head/libexec/rtld-elf/sparc64/rtld_start.S 117211 2003-07-04 00:05:15Z jake $
40 * $FreeBSD: head/libexec/rtld-elf/sparc64/rtld_start.S 130661 2004-06-18 02:01:37Z tmm $
41 */
42
43#include <machine/asm.h>
44
45/*
46 * ELF:
47 * On startup the stack should contain 16 extended word register save
48 * area, followed by the arg count, etc.

--- 17 unchanged lines hidden (view full) ---

66 jmp %o0
67 mov %l0, %o0
68END(.rtld_start)
69
70/*
71 * Find the address of _DYNAMIC by disassembling a call instruction to it.
72 * Binutils may not fill in the GOT as expected on other architectures.
73 */
41 */
42
43#include <machine/asm.h>
44
45/*
46 * ELF:
47 * On startup the stack should contain 16 extended word register save
48 * area, followed by the arg count, etc.

--- 17 unchanged lines hidden (view full) ---

66 jmp %o0
67 mov %l0, %o0
68END(.rtld_start)
69
70/*
71 * Find the address of _DYNAMIC by disassembling a call instruction to it.
72 * Binutils may not fill in the GOT as expected on other architectures.
73 */
74.weak _DYNAMIC
74
75
75ENTRY(rtld_dynamic)
76ENTRY(rtld_dynamic_addr)
76 save %sp, -CCFSZ, %sp
77 call 1f
78 nop
79 call _DYNAMIC + 8
801: lduw [%o7 + 8], %o0
81 sll %o0, 2, %o0
82 sra %o0, 0, %o0
83 ret
84 restore %o0, %o7, %o0
77 save %sp, -CCFSZ, %sp
78 call 1f
79 nop
80 call _DYNAMIC + 8
811: lduw [%o7 + 8], %o0
82 sll %o0, 2, %o0
83 sra %o0, 0, %o0
84 ret
85 restore %o0, %o7, %o0
85END(rtld_dynamic)
86END(rtld_dynamic_addr)
86
87 /*
88 * We have two separate entry points to the runtime linker.
89 * I'm implementing this following the SPARC v9 ABI spec.
90 *
91 * _rtld_bind_start_0(x, y) is called from .PLT0, and is used for
92 * PLT entries above 32768.
93 *

--- 76 unchanged lines hidden ---
87
88 /*
89 * We have two separate entry points to the runtime linker.
90 * I'm implementing this following the SPARC v9 ABI spec.
91 *
92 * _rtld_bind_start_0(x, y) is called from .PLT0, and is used for
93 * PLT entries above 32768.
94 *

--- 76 unchanged lines hidden ---