diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-07-22 00:10:33 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-07-22 00:10:33 +0000 |
commit | 60c966358ed6fa6ce3ded5426f46232cbfd8e0fd (patch) | |
tree | 2edfd4ad681692a2dbfdfcabaead5bca25ed2be5 /sysdeps/mips/dl-machine.h | |
parent | 907a1bacf996264c3197342cfc565b1d4f840bfb (diff) | |
download | glibc-60c966358ed6fa6ce3ded5426f46232cbfd8e0fd.tar glibc-60c966358ed6fa6ce3ded5426f46232cbfd8e0fd.tar.gz glibc-60c966358ed6fa6ce3ded5426f46232cbfd8e0fd.tar.bz2 glibc-60c966358ed6fa6ce3ded5426f46232cbfd8e0fd.zip |
Update.cvs/libc-ud-970721
1997-07-22 01:35 Ulrich Drepper <drepper@cygnus.com>
* Makerules (+make-deps): Use $(CFLAGS) in run of $(+mkdep) so
that optimizing is also selected for dependency generation.
* configure.in: Add machine description for TI c[34]x.
* inet/Makefile (routines): Remove ntohl and ntohs.
* inet/netinet/in.h: Use optimized version of hton? and ntoh?
for little endian machines.
* sysdeps/alpha/ntohl.s: Removed.
* sysdeps/alpha/ntohs.s: Removed.
* sysdeps/generic/ntohl.c: Removed.
* sysdeps/generic/ntohs.c: Removed.
* sysdeps/generic/htonl.c: Add aliases for ntohl.
* sysdeps/vax/htonl.s: Likewise.
* sysdeps/generic/htons.c: Add aliases for ntohs.
* sysdeps/vax/htons.s: Likewise.
* sysdeps/vax/ntohl.s: Removed.
* sysdeps/vax/ntohs.s: Removed.
* sysdeps/generic/bits/htontoh.h: New file.
* sysdeps/i386/htonl.S: New file.
* sysdeps/i386/htons.S: New file.
* sysdeps/i386/i486/htonl.S: New file.
* sysdeps/i386/fpu/bits/mathinline.h: Correct and optimized compare
macros.
* sysdeps/mips/dl-machine.h: Remove mips64 dependent parts.
* sysdeps/mips/mips64/dl-machine.h: New file.
* sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Don't install
syscall-list.h.
1997-07-12 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* libc.map: Add missing symbol _obstack.
1997-07-14 08:22 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/mips/rtld-parms: New.
* sysdeps/unix/sysv/linux/mips/lxstat.h: Moved to
* sysdeps/unix/sysv/linux/mips/lxstat.c: ...this.
* sysdeps/unix/sysv/linux/mips/sgidef.h: Moved to
* sysdeps/unix/sysv/linux/mips/sgidefs.h: ...this.
* sysdeps/generic/dl-sysdep.c (_start): Change to ENTRY_POINT.
1997-07-17 08:39 H.J. Lu <hjl@gnu.ai.mit.edu>
* sysdeps/mips/dl-machine.h: Remove extra stuff.
1997-07-06 07:18 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/bits/endian.h: Handle multiple endianess.
* stdlib/grouping.h: Suppress gcc warning about testing
unsigned char for less-than-zero.
* stdio-common/printf_fp.c: Likewise.
* stdio-common/vfprintf.c: Likewise.
* sysdeps/powerpc/add_n.s: New file.
* sysdeps/powerpc/sub_n.s: New file.
* sysdeps/powerpc/lshift.s: Ported XCOFF->ELF (from GMP).
* sysdeps/powerpc/mul_1.s: Ported XCOFF->ELF (from GMP).
* sysdeps/powerpc/addmul_1.s: Ported XCOFF->ELF (from GMP).
* sysdeps/powerpc/submul_1.s: Ported XCOFF->ELF (from GMP).
* sysdeps/powerpc/rshift.s: Ported XCOFF->ELF (from GMP).
* math/libm-test.c (cos_test, sin_test, sincos_test): Use
precomputed pi/6 rather than having gcc calculate it, otherwise
tests give inaccurate result due to inaccurate input.
* math/libm.map: Add __fe_*_env constants to list of exported
symbols.
* sysdeps/libm-ieee754/s_isinf.c: Simplify, make faster.
* sysdeps/libm-ieee754/s_isinff.c: Simplify, make faster.
* sysdeps/libm-ieee754/s_atan2f.c: Correct value of pi to be correct
round-to-nearest value.
* sysdeps/libm-ieee754/e_log.c: Make sure exceptions are raised.
* sysdeps/libm-ieee754/e_log10.c: Likewise.
* sysdeps/libm-ieee754/e_log10f.c: Likewise.
* sysdeps/libm-ieee754/e_logf.c: Likewise.
* sysdeps/libm-ieee754/s_log1p.c: Likewise. Also use correct -Inf.
* sysdeps/libm-ieee754/s_log1pf.c: Likewise. Also use correct -Inf.
* sysdeps/libm-ieee754/s_log2.c: Likewise.
* sysdeps/libm-ieee754/s_log2f.c: Likewise.
1997-07-15 21:54 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* nis/nss_compat/compat-grp.c: Fix "buffer to small" problems
and memory leaks.
* nis/nss_compat/compat-pwd.c: Likewise.
* nis/nss_compat/compat-spwd.c: Likewise.
* nis/nss_nis/nis-alias.c: Likewise.
* nis/nss_nis/nis-ethers.c: Likewise.
* nis/nss_nis/nis-grp.c: Likewise.
* nis/nss_nis/nis-hosts.c: Likewise.
* nis/nss_nis/nis-network.c: Likewise.
* nis/nss_nis/nis-proto.c: Likewise.
* nis/nss_nis/nis-pwd.c: Likewise.
* nis/nss_nis/nis-rpc.c: Likewise.
* nis/nss_nis/nis-service.c: Likewise.
* nis/nss_nis/nis-spwd.c: Likewise.
* nis/nss_nisplus-alias.c: Likewise.
* nis/nss_nisplus-ethers.c: Likewise.
* nis/nss_nisplus-grp.c: Likewise.
* nis/nss_nisplus-hosts.c: Likewise.
* nis/nss_nisplus-netgrp.c: Likewise.
* nis/nss_nisplus-network.c: Likewise.
* nis/nss_nisplus-proto.c: Likewise.
* nis/nss_nisplus-pwd.c: Likewise.
* nis/nss_nisplus-rpc.c: Likewise.
* nis/nss_nisplus-service.c: Likewise.
* nis/nss_nisplus-spwd.c: Likewise.
* nis/nss_nisplus-parse.c: If buffer to small, give -1 back.
1997-07-20 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/dl-machine.h (elf_machine_rela): Mention program
name in warning message.
* sysdeps/powerpc/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/sparc64/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/i386/dl-machine.h (elf_machine_rel): Print program name
first.
1997-07-20 19:33 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
* libc.map: Add _null_auth and _seterr_reply.
* sunrpc/clnt_udp.c (clntudp_call): If xargs is NULL, don't encode it.
Diffstat (limited to 'sysdeps/mips/dl-machine.h')
-rw-r--r-- | sysdeps/mips/dl-machine.h | 192 |
1 files changed, 1 insertions, 191 deletions
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index cc7198b60e..7456ae0b7a 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -125,32 +125,11 @@ elf_machine_got (void) } -/* Return the link-time address of _DYNAMIC. Conveniently, this is the - first element of the GOT. This must be inlined in a function which - uses global data. */ -static inline ElfW(Addr) -elf_machine_dynamic (void) -{ - register ElfW(Addr) gp asm ("$28"); - return * (ElfW(Addr) *) (gp - 0x7ff0); -} - /* Return the run-time load address of the shared object. */ static inline ElfW(Addr) elf_machine_load_address (void) { ElfW(Addr) addr; -#ifdef __mips64 - asm (" .set noreorder\n" - " dla %0, here\n" - " bltzal $0, here\n" - " nop\n" - "here: dsubu %0, $31, %0\n" - " .set reorder\n" - : "=r" (addr) - : /* No inputs */ - : "$31"); -#else asm (" .set noreorder\n" " la %0, here\n" " bltzal $0, here\n" @@ -160,7 +139,6 @@ elf_machine_load_address (void) : "=r" (addr) : /* No inputs */ : "$31"); -#endif return addr; } @@ -364,100 +342,6 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc) t8 index for this function symbol in .dynsym to usual c arguments. */ -#ifdef __mips64 -#define ELF_MACHINE_RUNTIME_TRAMPOLINE \ -/* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ - generated by the gnu linker. */ \ -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)); \ - \ -static ElfW(Addr) \ -__dl_runtime_resolve (ElfW(Word) sym_index, \ - ElfW(Word) return_address, \ - ElfW(Addr) old_gpreg, \ - ElfW(Addr) stub_pc) \ -{ \ - struct link_map *l = elf_machine_runtime_link_map (old_gpreg, stub_pc); \ - const ElfW(Sym) *const symtab \ - = (const ElfW(Sym) *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr); \ - const char *strtab \ - = (void *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr); \ - const ElfW(Addr) *got \ - = (const ElfW(Addr) *) (l->l_addr + l->l_info[DT_PLTGOT]->d_un.d_ptr); \ - const ElfW(Word) local_gotno \ - = (const ElfW(Word)) l->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; \ - const ElfW(Word) gotsym \ - = (const ElfW(Word)) l->l_info[DT_MIPS (GOTSYM)]->d_un.d_val; \ - const ElfW(Sym) *definer; \ - ElfW(Addr) loadbase; \ - ElfW(Addr) funcaddr; \ - struct link_map **scope; \ - \ - /* Look up the symbol's run-time value. */ \ - scope = _dl_object_relocation_scope (l); \ - definer = &symtab[sym_index]; \ - \ - loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer, \ - scope, l->l_name, ELF_MACHINE_RELOC_NOPLT); \ - \ - *_dl_global_scope_end = NULL; \ - \ - /* Apply the relocation with that value. */ \ - funcaddr = loadbase + definer->st_value; \ - *(got + local_gotno + sym_index - gotsym) = funcaddr; \ - \ - return funcaddr; \ -} \ - \ -asm ("\n \ - .text\n \ - .align 3\n \ - .globl _dl_runtime_resolve\n \ - .type _dl_runtime_resolve,@function\n \ - .ent _dl_runtime_resolve\n \ -_dl_runtime_resolve:\n \ - .set noreorder\n \ - # Save old GP to $3.\n \ - move $3,$28\n \ - # Modify t9 ($25) so as to point .cpload instruction.\n \ - daddu $25,2*8\n \ - # Compute GP.\n \ - .cpload $25\n \ - .set reorder\n \ - # Save slot call pc.\n \ - move $2, $31\n \ - # Save arguments and sp value in stack.\n \ - dsubu $29, 10*8\n \ - .cprestore 8*8\n \ - sd $15, 9*8($29)\n \ - sd $4, 3*8($29)\n \ - sd $5, 4*8($29)\n \ - sd $6, 5*8($29)\n \ - sd $7, 6*8($29)\n \ - sd $16, 7*8($29)\n \ - move $16, $29\n \ - move $4, $24\n \ - move $5, $15\n \ - move $6, $3\n \ - move $7, $2\n \ - jal __dl_runtime_resolve\n \ - move $29, $16\n \ - ld $31, 9*8($29)\n \ - ld $4, 3*8($29)\n \ - ld $5, 4*8($29)\n \ - ld $6, 5*8($29)\n \ - ld $7, 6*8($29)\n \ - ld $16, 7*8($29)\n \ - daddu $29, 10*8\n \ - move $25, $2\n \ - jr $25\n \ - .end _dl_runtime_resolve\n \ -"); -#else #define ELF_MACHINE_RUNTIME_TRAMPOLINE \ /* The flag _dl_mips_gnu_objects is set if all dynamic objects are \ generated by the gnu linker. */ \ @@ -550,7 +434,6 @@ _dl_runtime_resolve:\n \ jr $25\n \ .end _dl_runtime_resolve\n \ "); -#endif /* Mask identifying addresses reserved for the user program, where the dynamic linker should not map anything. */ @@ -573,78 +456,6 @@ _dl_runtime_resolve:\n \ 2) That under Linux the entry is named __start and not just plain _start. */ -#ifdef __mips64 -#define RTLD_START asm ("\ - .text\n\ - .align 3\n"\ -_RTLD_PROLOGUE (ENTRY_POINT)\ -" .globl _dl_start_user\n\ - .set noreorder\n\ - bltzal $0, 0f\n\ - nop\n\ -0: .cpload $31\n\ - .set reorder\n\ - # i386 ABI book says that the first entry of GOT holds\n\ - # the address of the dynamic structure. Though MIPS ABI\n\ - # doesn't say nothing about this, I emulate this here.\n\ - dla $4, _DYNAMIC\n\ - sd $4, -0x7ff0($28)\n\ - move $4, $29\n\ - jal _dl_start\n\ - # Get the value of label '_dl_start_user' in t9 ($25).\n\ - dla $25, _dl_start_user\n\ -_dl_start_user:\n\ - .set noreorder\n\ - .cpload $25\n\ - .set reorder\n\ - move $16, $28\n\ - # Save the user entry point address in saved register.\n\ - move $17, $2\n\ - # See if we were run as a command with the executable file\n\ - # name as an extra leading argument.\n\ - ld $2, _dl_skip_args\n\ - beq $2, $0, 1f\n\ - # Load the original argument count.\n\ - ld $4, 0($29)\n\ - # Subtract _dl_skip_args from it.\n\ - dsubu $4, $2\n\ - # Adjust the stack pointer to skip _dl_skip_args words.\n\ - dsll $2,2\n\ - daddu $29, $2\n\ - # Save back the modified argument count.\n\ - sd $4, 0($29)\n\ - # Get _dl_default_scope[2] as argument in _dl_init_next call below.\n\ -1: dla $2, _dl_default_scope\n\ - ld $4, 2*8($2)\n\ - # Call _dl_init_next to return the address of an initializer\n\ - # function to run.\n\ - jal _dl_init_next\n\ - move $28, $16\n\ - # Check for zero return, when out of initializers.\n\ - beq $2, $0, 2f\n\ - # Call the shared object initializer function.\n\ - move $25, $2\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8($29)\n\ - ld $7, 3*8($29)\n\ - jalr $25\n\ - move $28, $16\n\ - # Loop to call _dl_init_next for the next initializer.\n\ - b 1b\n\ - # Pass our finalizer function to the user in ra.\n\ -2: dla $31, _dl_fini\n\ - # Jump to the user entry point.\n\ - move $25, $17\n\ - ld $4, 0($29)\n\ - ld $5, 1*8($29)\n\ - ld $6, 2*8$29)\n\ - ld $7, 3*8($29)\n\ - jr $25\n"\ -_RTLD_EPILOGUE(ENTRY_POINT) \ -); - -#else #define RTLD_START asm ("\ .text\n"\ _RTLD_PROLOGUE(ENTRY_POINT)\ @@ -718,8 +529,7 @@ _dl_start_user:\n\ lw $7, 12($29)\n\ jr $25\n"\ _RTLD_EPILOGUE(ENTRY_POINT)\ -"); -#endif +); /* The MIPS never uses Elfxx_Rela relocations. */ #define ELF_MACHINE_NO_RELA 1 |