Commit Graph

83 Commits

Author SHA1 Message Date
Daniel Jacobowitz
9077d4dc20 * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
r_info argument to ElfW(Addr).
2007-05-23 16:50:14 +00:00
Daniel Jacobowitz
cb5bcf7412 * sysdeps/mips/dl-machine.h (ELF_MACHINE_NO_RELA): Delete.
(elf_machine_reloc): New function, retaining the body of
	elf_machine_rel.  Take the reloc's r_info field as an argument,
	not the reloc itself.  Add extra r_addend and inplace_p arguments.
	When inplace_p is false, use r_addend as the addend, not the contents
	of the relocation field.  Hoist the conversion of reloc_addr to
	"ELFW(Addr) *".  Don't try to apply TLS relocations against
	undefined symbols.  Add R_MIPS_GLOB_DAT support.
	(elf_machine_rel, elf_machine_rela): Use elf_machine_reloc.
	(elf_machine_lazy_rel): Change the reloc type from ElfW(Rel)
	to ElfW(Rela).
2007-01-08 15:34:50 +00:00
Daniel Jacobowitz
6428ce3cda * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
(INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
	(INTERNAL_SYSCALL_NCS): New.
	(internal_syscall0, internal_syscall1, internal_syscall2,
	internal_syscall3, internal_syscall4, internal_syscall5,
	internal_syscall6): Take ncs_init, cs_init, and input arguments.
	Use them.  Correct types for registers.
	* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
	(INTERNAL_SYSCALL): Update internal_syscall##nr invocation.
	(INTERNAL_SYSCALL_NCS): New.
	(internal_syscall0, internal_syscall1, internal_syscall2,
	internal_syscall3, internal_syscall4, internal_syscall5,
	internal_syscall6): Take ncs_init, cs_init, and input arguments.
	Use them.
	* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove
	recvfrom and sendto.  Mark lseek, msgrcv, and msgsnd as cancellation
	points.
	* sysdeps/mips/dl-machine.h (elf_machine_rel): Remove unused "value".
	Use Elf(Addr) for TLS relocation targets.
	* sysdeps/unix/sysv/linux/mips/mips64/Makefile: New file.
	* sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (lll_futex_wait,
	lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): Cast
	futexp to long for n64.
	* sysdeps/unix/sysv/linux/mips/mips64/nptl/sysdep-cancel.h: New file.
2006-03-03 01:06:48 +00:00
Roland McGrath
3fd1052d4b 2006-01-29 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/mips/dl-machine.h (RTLD_START): Correct offsets for
	N64.
2006-01-31 01:25:58 +00:00
Andreas Jaeger
305fae3b19 (elf_machine_rel): Add TLS relocations. 2005-03-28 09:32:04 +00:00
Andreas Jaeger
bd9fad095a (elf_machine_runtime_link_map, ELF_DL_FRAME_SIZE,
ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS,
	ELF_MACHINE_RUNTIME_TRAMPOLINE): Move to dl-trampoline.c.
	(RTLD_START): Align the stack before calling _dl_init_internal.
	Use .ent for _dl_start_user.
	(ARCH_LA_PLTENTER, ARCH_LA_PLTEXIT): Define.
	(elf_machine_rel, elf_machine_rel_relative, elf_machine_lazy_rel)
	(elf_machine_runtime_setup): Use "auto inline".
	(elf_machine_rela, elf_machine_rela_relative): Provide empty versions.
	(elf_machine_got_rel): Likewise.  Use RESOLVE_MAP.
2005-03-28 07:47:27 +00:00
Andreas Jaeger
b8ddf7a11f Include <sgidefs.h>. Use _ABIO32, _ABIN32 and _ABI64 for ABI selection
throughout.
2004-11-24 04:36:11 +00:00
Ulrich Drepper
a270d32ff2 (elf_machine_runtime_link_map): Replace iteration over GL(dl_loaded)
chain with iteration over all namespaces' _ns_loaded chains.
2004-10-14 16:08:53 +00:00
Andreas Jaeger
7048b1bff0 (_dl_start_user): Don't set __libc_stack_end. 2004-08-25 05:57:35 +00:00
Andreas Jaeger
24c4c341e3 Use standard names for ABI macros, include sgidefs.h where appropriate. 2004-07-20 16:35:32 +00:00
Andreas Jaeger
ef827649e7 (__dl_runtime_resolve): Update to use _dl_lookup_symbol_x.
(elf_machine_runtime_link_map): Don't INTUSE _dl_signal_error.
2004-07-20 09:24:49 +00:00
Roland McGrath
7255da777a 2004-05-15 Chris Demetriou <cgd@broadcom.com>
* sysdeps/mips/dl-machine.h (ELF_DL_FRAME_SIZE)
	(ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS): For the N32
	and 64 ABIs, save and restore regs $10 and $11 (a6 and a7).
2004-05-20 22:07:15 +00:00
Andreas Jaeger
57f4291c9d Fix last commit. 2004-04-15 14:08:16 +00:00
Andreas Jaeger
af6aab77a6 (RTLD_START): Do not use nested .end. 2004-04-15 04:50:11 +00:00
Alexandre Oliva
5027ae109a * elf/dynamic-link.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Don't assume
reloc_addr is aligned.
* sysdeps/alpha/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/arm/dl-machine.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
* sysdeps/cris/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/hppa/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela,
elf_machine_rel_relative, elf_machine_rela_relative): Adjust.
* sysdeps/ia64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/m68k/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/mips/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/powerpc/powerpc64/dl-machine.h
(elf_machine_rela_relative, elf_machine_rela): Adjust.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative):
* sysdeps/sh/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
* sysdeps/x86_64/dl-machine.h (elf_machine_rela,
elf_machine_rela_relative): Adjust.
2003-07-31 06:33:52 +00:00
Alexandre Oliva
721e2474d6 * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Fix harmless
typo in #if test.
2003-03-22 12:50:46 +00:00
Alexandre Oliva
3d06657c53 * sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_MASK): Define
properly for n64.
(elf_machine_runtime_setup): Cast link_map pointer to Elf Addr
type.
(elf_machine_rel, elf_machine_rel_relative): Cast symidx to Elf
Word before comparing with gotsym.  Take reloc_addr argument as
void*.  Remove the code added for the compiler to drop any
alignment assumptions.
2003-03-20 07:54:21 +00:00
Alexandre Oliva
0d5b725772 * sysdeps/mips/dl-machine.h: Include sys/asm.h.
(elf_machine_matches_host): Prevent linking of o32 and n32
together.
(elf_machine_dynamic): Document assumption on $gp.
(STRINGXP, STRINGXV, STRINGV_): New macros.
(elf_machine_load_address): Use them to stringize PTR_LA and
PTR_SUBU.
(ELF_DL_FRAME_SIZE, ELF_DL_SAVE_ARG_REGS,
ELF_DL_RESTORE_ARG_REGS, IFABIO32): New macros used in...
(_dl_runtime_resolve): Adjust it for all 3 ABIs.
(__dl_runtime_resolve): Cast the symtab initializer to the
right type.
(RTLD_START): Use it.  Adjust it for all 3 ABIs.
(elf_machine_rel): Mark as always_inline in RTLD_BOOTSTRAP.
Handle 64-bit R_MIPS_REL composite relocation and accept
R_MIPS_64 relocations to shift addend size to 64 bits.
Document assumption regarding local GOT entries.  Document
backward-compatibility departing from the ABI behavior in
applying relocations that reference section symbols, no longer
used.  Support relocations to mis-aligned offsets.
* sysdeps/mips/mips64/dl-machine.h: Deleted, obsolete.
2003-03-14 08:43:13 +00:00
Ulrich Drepper
c157224cb8 (ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix masking of version index. 2003-02-12 09:42:48 +00:00
Roland McGrath
a30e09230b 2002-09-28 Roland McGrath <roland@redhat.com>
* sysdeps/mach/hurd/dl-sysdep.c (_dl_important_hwcaps): Use INTUSE for
	_dl_signal_error.
	* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise.
	* sysdeps/powerpc/powerpc64/dl-machine.c
	(_dl_reloc_overflow): Likewise.
	* sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise.
	(elf_machine_rela): Likewise.
2002-09-28 19:45:29 +00:00
Roland McGrath
ce8a8f74e4 2002-09-18 Roland McGrath <roland@redhat.com>
* elf/do-rel.h (elf_dynamic_do_rel): Mask off 0x8000 bit (hidden flag)
	from the value taken from the DT_VERSYM table.
	* elf/dl-runtime.c (fixup, profile_fixup): Likewise.
	* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Likewise.
	(RESOLVE_GOTSYM): Likewise.
2002-09-18 18:28:43 +00:00
Ulrich Drepper
404d6b4b46 Adjust all callers of _dl_lookup_symbol and _dl_lookup_versioned_symbol. 2002-04-13 07:53:04 +00:00
Ulrich Drepper
dca9c7304b Add HAVE_VISIBILITY_ATTRIBUTE and HAVE_SDATA_SECTION. 2002-02-28 22:36:33 +00:00
Andreas Jaeger
4bf39226fa * sysdeps/mips/dl-machine.h (elf_machine_matches_host): Use
__attribute_used__.
	(__dl_runtime_resolve): Likewise.

	* sysdeps/mips/machine-gmon.h (_MCOUNT_DECL): Make it a real
	declaration.
2002-02-08 18:56:57 +00:00
Ulrich Drepper
c577723005 (RTLD_START): Call _dl_init_internal instead of _dl_init. 2002-02-03 00:29:15 +00:00
Ulrich Drepper
f71d7f5726 Move global variables for SHARED code in struct _rtld_global. Export
this struct, remove all exports for the signal variables.
2002-02-01 01:32:06 +00:00
Ulrich Drepper
872cf89f66 (ELF_MACHINE_BEFORE_RTLD_RELOC): Don't use label at end of compound statement. 2002-01-29 02:58:00 +00:00
Ulrich Drepper
046f02be6f (__dl_runtime_resolve): Remove const' from got'. 2002-01-17 23:21:33 +00:00
Ulrich Drepper
09d4f65308 Fix usage of new _dl_signal_error() format. 2001-09-08 17:16:44 +00:00
Ulrich Drepper
560c476139 (__dl_runtime_resolve): Pass ELF_RTYPE_CLASS_PLT, instead of R_MIPS_REL32, to
_dl_lookup_versioned_symbol () and _dl_lookup_symbol ().
2001-08-29 18:48:49 +00:00
Ulrich Drepper
5c6029e5c0 (elf_machine_lookup_noplt_p, elf_machine_lookup_noexec_p): Remove.
(elf_machine_type_class): Define.
2001-08-26 22:26:38 +00:00
Ulrich Drepper
335e9a00db (elf_machine_rel_relative): Use ElfW(Rel) in argument. 2001-08-24 14:53:23 +00:00
Ulrich Drepper
85bdccdbd2 Define elf_machine_rel_relative. Minor optimizations. 2001-08-24 08:43:21 +00:00
Ulrich Drepper
760ab2840b (MAP_BASE_ADDR): Removed.
(elf_machine_got_rel): Defined only if RTLD_BOOTSTRAP is not defined.
(RESOLVE_GOTSYM): Rewrite to use RESOLVE.
2001-07-16 22:26:12 +00:00
Andreas Jaeger
3214b89b32 Update to LGPL v2.1. 2001-07-06 04:56:23 +00:00
Andreas Jaeger
e33c3af9cb * sysdeps/mips/bsd-_setjmp.S (_setjmp): Reorder instructions to
avoid problems on MIPS I.
	* sysdeps/mips/bsd-setjmp.S (setjmp): Likewise.

	* sysdeps/mips/dl-machine.h (RTLD_START): Remove duplicate ".set
	noreorder".
2001-02-22 08:27:50 +00:00
Andreas Jaeger
9285ecc8a1 (elf_machine_rel): Add the symbol's
value plus the run-time displacement to the relocation for non-GOT
symbols.  Set the relocation to the GOT entry for GOT symbols.
2000-11-02 09:32:30 +00:00
Andreas Jaeger
67d3dc3d79 Partly revert patch from 2000-10-18. 2000-10-24 07:01:37 +00:00
Ulrich Drepper
f1dba30859 (elf_machine_matches_host): Parameter is now pointer to ELF header. 2000-10-20 17:04:28 +00:00
Andreas Jaeger
d9c1416a4a 2000-10-18 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (ELF_MIPS_GNU_GOT1_OK): New.
	(ELF_MACHINE_BEFORE_RTLD_RELOC): Handle newer linkers.
	(elf_machine_runtime_link_map): Likewise.
	(elf_machine_runtime_setup): Likewise.
	Handle dynamic linker's local got entries.
	Patches by Ralf Baechle <ralf@gnu.org>.

2000-10-09  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>

	* sysdeps/mips/dl-machine.h (_dl_runtime_resolve): Define $sp as
	the frame pointer.  Allocate stack space for $a0 for
	__dl_runtime_resolve().  Do not save $sp in $s0 as it's
	callee-saved anyway.
2000-10-18 10:21:16 +00:00
Ulrich Drepper
d89e0413b2 (RTLD_START): Fix computation of envp argument passed to _dl_init. 2000-10-01 22:36:00 +00:00
Andreas Jaeger
921bb2c300 * sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Reformat. Declare
as function.
        (_RTLD_EPILOGUE): Reformat.  Declare size of entry function.
        (ELF_MACHINE_BEFORE_RTLD_RELOC): Relocate the dynamic linker itself so
        it will even work when not loaded to the standard address.
        (RTLD_START): Reformat.  Call _dl_start in a way that is safe even
        before the dynamic linker itself is relocated.
2000-09-18 16:40:35 +00:00
Andreas Jaeger
5e817c4e87 * sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Fix calls to
dl_lookup.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
2000-09-07 14:53:05 +00:00
Andreas Jaeger
c52761c183 * sysdeps/mips/dl-machine.h (_RTLD_PROLOGUE): Stringify using
__STRING(entry) and not #entry.
	(_RTLD_EPILOGUE): Likewise.
	* sysdeps/mips/mips64/dl-machine.h: Likewise.
2000-07-25 10:32:02 +00:00
Andreas Jaeger
74cb5b6093 2000-07-10 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Verify
	that gpreg really points to the GOT section of the calling object.
	Scan all PT_LOAD segments of objects for stub_pc, instead of only
	checking a start address of first one.
	Fix typos.
	* sysdeps/mips/mips64/dl-machine.h (elf_machine_runtime_link_map):
	Likewise.

	* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Fix a typo.
2000-07-10 13:51:45 +00:00
Andreas Jaeger
feaff18976 * sysdeps/mips/dl-machine.h: Always use $25 as jump register.
Patch by Ralf Baechle <ralf@uni-koblenz.de>.
2000-06-18 17:20:01 +00:00
Andreas Jaeger
49e1806ccb * sysdeps/mips/dl-machine.h: Pass finalizer correctly to user
entry point.
	Reported by Jim Pick <jim@jimpick.com>.
2000-06-14 13:13:58 +00:00
Andreas Jaeger
5494bc3a50 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.
2000-04-21 16:37:58 +00:00
Andreas Jaeger
5166e402b8 2000-04-18 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_rel): Fix relocation.
2000-04-18 18:31:00 +00:00
Andreas Jaeger
a4d132bfdf (elf_machine_relplt): Removed, it's not needed.
(_dl_runtime_resolve): Fix \n for a comment, safe gp and not pc.
2000-04-17 23:56:16 +00:00