2000-04-21 Andreas Jaeger <aj@suse.de>

* sysdeps/mips/elf/start.S: Use __PIC__ instead of PIC.
	* sysdeps/mips/mips64/add_n.S: Likewise.
	* sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
	* sysdeps/mips/mips64/lshift.S: Likewise.
	* sysdeps/mips/mips64/mul_1.S: Likewise.
	* sysdeps/mips/mips64/rshift.S: Likewise.
	* sysdeps/mips/mips64/setjmp.S: Likewise.
	* sysdeps/mips/mips64/sub_n.S: Likewise.
	* sysdeps/mips/mips64/submul_1.S: Likewise.

	* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Remove strtab
	and update comment.  The strtab from _dl_relocate_object can be
	used.
This commit is contained in:
Andreas Jaeger 2000-04-21 16:37:58 +00:00
parent ec92d93746
commit 5ac4c397b7
10 changed files with 31 additions and 34 deletions

View File

@ -218,7 +218,7 @@ int _dl_mips_gnu_objects = 1; \
/* This is called from assembly stubs below which the compiler can't see. */ \
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word), ElfW(Word), ElfW(Addr), ElfW(Addr)) \
__attribute__ ((unused)); \
__attribute__ ((unused)); \
\
static ElfW(Addr) \
__dl_runtime_resolve (ElfW(Word) sym_index, \
@ -274,7 +274,7 @@ __dl_runtime_resolve (ElfW(Word) sym_index, \
/* We already found the symbol. The module (and therefore its load \
address) is also known. */ \
value = l->l_addr + sym->st_value; \
\
\
/* Apply the relocation with that value. */ \
*(got + local_gotno + sym_index - gotsym) = value; \
\
@ -297,7 +297,7 @@ _dl_runtime_resolve:\n \
.cpload $25\n \
.set reorder\n \
# Save slot call pc.\n \
move $2, $31\n \
move $2, $31\n \
# Save arguments and sp value in stack.\n \
subu $29, 40\n \
.cprestore 32\n \
@ -468,11 +468,9 @@ elf_machine_got_rel (struct link_map *map, int lazy)
ElfW(Addr) *got;
ElfW(Sym) *sym;
int i, n, symidx;
#ifndef RTLD_BOOTSTRAP
const char *strtab = (const void *) D_PTR (map, l_info[DT_STRTAB]);
#endif
/* This function is loaded in dl-reloc as a nested function and can
therefore access the variable scope from _dl_relocate_object. */
therefore access the variables scope and strtab from
_dl_relocate_object. */
#ifdef RTLD_BOOTSTRAP
# define RESOLVE_GOTSYM(sym,sym_index) 0
#else

View File

@ -51,7 +51,7 @@
char **argv, void (*init) (void), void (*fini) (void),
void (*rtld_fini) (void), void *stack_end)
*/
#ifdef PIC
#ifdef __PIC__
/* A macro to (re)initialize gp. We can get the run time address of 0f in
ra ($31) by blezal instruction. In this early phase, we can't save gp
in stack and .cprestore doesn't work properly. So we set gp by using
@ -67,7 +67,7 @@
.text
.globl ENTRY_POINT
ENTRY_POINT:
#ifdef PIC
#ifdef __PIC__
SET_GP
#endif
move $31, $0
@ -93,7 +93,6 @@ ENTRY_POINT:
sw $2, 20($29) /* rtld_fini */
sw $29, 24($29) /* stack_end */
jal __libc_start_main
hlt: b hlt /* Crash if somehow it does return. */
/* Define a symbol for the first piece of initialized data. */

View File

@ -1,7 +1,7 @@
/* MIPS3 __mpn_add_n -- Add two limb vectors of the same length > 0 and
* store sum in a third limb vector.
*
* Copyright (C) 1995 Free Software Foundation, Inc.
* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -30,7 +30,7 @@
* s2_ptr $6
* size $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -39,7 +39,7 @@
.ent __mpn_add_n
__mpn_add_n:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro

View File

@ -1,5 +1,5 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -23,11 +23,11 @@
#include <sysdep.h>
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
ENTRY (_setjmp)
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
dla t9, C_SYMBOL_NAME (__sigsetjmp)

View File

@ -1,6 +1,6 @@
/* MIPS3 __mpn_lshift --
*
* Copyright (C) 1995 Free Software Foundation, Inc.
* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -29,7 +29,7 @@
* cnt $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -38,7 +38,7 @@
.ent __mpn_lshift
__mpn_lshift:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro

View File

@ -1,7 +1,7 @@
/* MIPS3 __mpn_mul_1 -- Multiply a limb vector with a single limb and
* store the product in a second limb vector.
*
* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
* Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -30,7 +30,7 @@
* s2_limb $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -39,7 +39,7 @@
.ent __mpn_mul_1
__mpn_mul_1:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro

View File

@ -1,6 +1,6 @@
/* MIPS3 __mpn_rshift --
*
* Copyright (C) 1995 Free Software Foundation, Inc.
* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -29,7 +29,7 @@
* cnt $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -38,7 +38,7 @@
.ent __mpn_rshift
__mpn_rshift:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -21,11 +21,11 @@
/* The function __sigsetjmp_aux saves all the registers, but it can't
reliably access the stack or frame pointers, so we pass them in as
extra arguments. */
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
ENTRY (__sigsetjmp)
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
move a2, sp

View File

@ -1,7 +1,7 @@
/* MIPS3 __mpn_sub_n -- Subtract two limb vectors of the same length > 0 and
* store difference in a third limb vector.
*
* Copyright (C) 1995 Free Software Foundation, Inc.
* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -30,7 +30,7 @@
* size $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -39,7 +39,7 @@
.ent __mpn_sub_n
__mpn_sub_n:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro

View File

@ -1,7 +1,7 @@
/* MIPS3 __mpn_submul_1 -- Multiply a limb vector with a single limb and
* subtract the product from a second limb vector.
*
* Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
* Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
*
* This file is part of the GNU MP Library.
*
@ -30,7 +30,7 @@
* s2_limb $7
*/
#ifdef PIC
#ifdef __PIC__
.option pic2
#endif
.text
@ -39,7 +39,7 @@
.ent __mpn_submul_1
__mpn_submul_1:
.set noreorder
#ifdef PIC
#ifdef __PIC__
.cpload t9
#endif
.set nomacro