Commit Graph

67 Commits

Author SHA1 Message Date
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
Andreas Jaeger
4f20384216 2000-04-17 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Optimize a bit
	as suggested by Ulrich Drepper.
	(__dl_runtime_resolve): Remove unused variable, initialize sym
	directly.
	(RTLD_START): Document OFFSET_GP_GOT.
	(OFFSET_GP_GOT): New magic value.
	(elf_mips_got_from_gpreg): Use OFFSET_GP_GOT.
	(elf_machine_got_rel): Only declare strtab if needed.
2000-04-17 21:22:59 +00:00
Andreas Jaeger
245bff9408 2000-04-14 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize
	symidx correctly.
	(elf_machine_got_rel): Cast sym correctly.
2000-04-15 04:33:57 +00:00
Andreas Jaeger
127035bb55 2000-04-14 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_got_rel): Initialize
	symidx correctly.

	* sysdeps/mips/add_n.S: Use __PIC__, add .end directive.
2000-04-15 03:45:10 +00:00
Andreas Jaeger
12c4efc1d0 2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h
	(elf_machine_got_rel): Handle symbol versioning.
2000-04-14 00:35:39 +00:00
Andreas Jaeger
043351e023 2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h
	(elf_machine_got_rel): Only add runtime display if needed.
2000-04-14 00:15:38 +00:00
Andreas Jaeger
15d5e7dc14 2000-04-13 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Handle symbol
	versioning.
2000-04-13 23:55:20 +00:00
Andreas Jaeger
5719e666f7 2000-04-11 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h: Update some comments.
	(ELF_MACHINE_ALIGN_MASK): Removed, it's not needed.
2000-04-12 17:59:20 +00:00
Andreas Jaeger
3a344e73cc 2000-03-31 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (RTLD_START): Rewritten to match new
        init function interface.
        * sysdeps/mips/mips64/dl-machine.h (RTLD_START): Likewise.
2000-03-31 12:35:12 +00:00
Andreas Jaeger
f5a37cdb1b 2000-03-24 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Use D_PTR to
	access relocated entries in l_info.
	(elf_machine_got_rel): Likewise.
	(elf_machine_runtime_setup): Likewise.
	* sysdeps/mips/mips64/dl-machine.h (elf_machine_got_rel): Likewise.
	(elf_machine_runtime_setup): Likewise.
	(__dl_runtime_resolve): Likewise.
2000-03-24 15:27:37 +00:00
Andreas Jaeger
bab23124f0 2000-02-12 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (__start): Rewritten for 2.2 startup
	conventions.
	(elf_machine_rel): Use R_MIPS_REL32 for RESOLVE.
	(elf_machine_runtime_setup,elf_machine_got_rel): Move at end of
	file and make dependend on RESOLVE.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Fix arguments to _dl_lookup_symbol.
	(RESOLVE_GOTSYM): Fix arguments to _dl_lookup_symbol.
2000-02-12 11:27:47 +00:00
Andreas Jaeger
be57c15a96 2000-01-10 Andreas Jaeger <aj@suse.de>
* sysdeps/mips/dl-machine.h (elf_machine_matches_host): Follow
	change from 1999-10-07 to elf/elf.h and rename EM_MIPS_RS4_BE to
	EM_MIPS_RS3_LE.
	* sysdeps/mips/mips64/dl-machine.h: Likewise.
2000-01-10 17:34:40 +00:00
Andreas Jaeger
119fab9878 Fix typo in applying last patch. 1999-11-23 15:57:26 +00:00
Andreas Jaeger
58f68573b9 * sysdeps/mips/dl-machine.h (elf_machine_dynamic): New function.
(elf_machine_got): Removed, not needed anymore.
	(ELF_MACHINE_RELOC_NOPLT): Removed.
	(ELF_MACHINE_JMP_SLOT): Added.
	(_RTLD_PROLOGUE): We use gcc, no need to check for __STDC__.
	(_RTLD_EPILOGUE): Likewise.
	(RESOLVE_GOTSYM): Use R_MIPS_REL32.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Likewise.
	Based on patches from Maciej W. Rozycki <macro@ds2.pg.gda.pl> and
	Ralf Baechle <baechle@uni-koblenz.de>.
1999-11-23 15:49:22 +00:00
Roland McGrath
893f3d106f 1999-07-21 Roland McGrath <roland@baalperazim.frob.com>
* elf/dl-reloc.c (_dl_reloc_bad_type): New function.
	* elf/ldsodefs.h: Declare it.
	* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Use it
	instead of assert.
	(elf_machine_lazy_rel): Likewise.  Take new arg MAP.
	* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/mips/dl-machine.h (elf_machine_rel): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/mips/mips64/dl-machine.h (elf_machine_rel): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/m68k/dl-machine.h (elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/generic/dl-machine.h (elf_machine_rel): Likewise.
	* sysdeps/arm/dl-machine.h (elf_machine_rel): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/alpha/dl-machine.h (elf_machine_rela): Likewise.
	(elf_machine_lazy_rel): Likewise.
	* sysdeps/powerpc/dl-machine.h (elf_machine_lazy_rel): Likewise.
	* sysdeps/powerpc/dl-machine.c (__process_machine_rela): Use
	_dl_reloc_bad_type instead of _dl_signal_error.
	* elf/do-rel.h (elf_dynamic_do_rel): Pass MAP to elf_machine_lazy_rel.
1999-07-21 16:57:52 +00:00
Ulrich Drepper
e675032fec (elf_machine_runtime_setup): DT_PLTGOT entry is already relocated. 1999-02-20 18:22:38 +00:00
Ulrich Drepper
3aa76df334 (elf_machine_got_rel): Likewise.
(elf_machine_got_rel): Likewise for DT_SYMTAB and DT_STRTAB.
1999-02-20 15:00:01 +00:00