Commit Graph

29 Commits

Author SHA1 Message Date
Carlos O'Donell dde6fc785a hppa: Remove relocation in OPD handling code.
A current bug in the hppa binutils code causes
relative relocations to be mixed with OPD relocations.

The OPD handling code in ld.so requires a relocation to
setup one of the data structures.

At startup ld.so tries to use the structure to handle
an OPD relocation *before* the structure is completely
setup by the relative relocation and this causes a crash.

This code is a workaround and a bandaid, the real fix
is in the static linker, but until then we must avoid
relocations in dl-fptr.c.

We copy dl-fptr.c from generic code, modify it, and
adjust the headers to fixup the structure at runtime
instead of having the relocation do this for us
automatically.
2012-04-17 05:46:34 +02:00
Paul Eggert ab84e3ff9c Replace FSF snail mail address by URL. 2012-03-09 23:56:38 +00:00
Andreas Schwab 09272d2c9f hppa: don't call ifunc functions in trace mode 2011-10-05 11:52:45 +02:00
Carlos O'Donell ec4cafcbcd 2009-04-23 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-machine.h: Remove VALID_ELF_OSABI,
	VALID_ELF_ABIVERSION, and VALID_ELF_HEADER.
2009-04-24 02:53:23 +00:00
Carlos O'Donell 370b2f2c97 2009-02-22 Carlos O'Donell <carlos@codesourcery.com>
* sysdeps/hppa/dl-machine.h: Use _dl_runtime_profile.
2009-02-22 17:02:14 +00:00
Carlos O'Donell 2625a1fb08 2006-09-13 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (RTLD_START): Comment the use of
	_dl_fini_plabel.
	* sysdeps/hppa/elf/start.S: Correctly pass r23 to argument 6 of
	__libc_start_main. Comment the order of arguments at entry and
	those to __libc_start_main.
2006-09-13 21:56:09 +00:00
Carlos O'Donell 0daa050021 2006-09-07 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h (elf_machine_fixup_plt): Remove
	lvalue cast.
	* sysdeps/hppa/dl-trampoline.S (_dl_fixup): Correct stack usage.
	(_dl_runtime_profile): LA fixups.
	* sysdeps/unix/sysv/linux/hppa/clone.S: Correct stack usage. Return
	-1 on error. Use branch and link for error handler funciton.
	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Correct stack usage.
	Avoid register shuffling.
	* sysdeps/unix/sysv/linux/hppa/bits/atomic.h (ASM_EAGAIN): Define
	as -EAGAIN.
	* sysdeps/unix/sysv/linux/hppa/bits/mman.h: Adjust definitions to
	match required standards.
	* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
	(lll_futex_wait): Return __ret.
	(lll_futex_timed_wait): Likewise.
	(lll_futex_wake): Likewise.
	(lll_futex_requeue): Likewise.
	* sysdeps/unix/sysv/linux/hppa/nptl/pt-vfork.S: Correct stack
	usage and adjust error return.
	* sysdeps/unix/sysv/linux/hppa/nptl/sysdep-cancel.h: Adjust
	stack usage for gdb, and avoid extra register loads.
	* sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c: Copy
	nptl/sysdeps/pthread/unwind-forcedunwind.c.
	(LIBGCC_SO): Define and use.
	* sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c: Copy
	nptl/sysdeps/pthread/unwind-resume.c.
	(LIBGCC_SO): Define and use.
2006-09-07 16:34:43 +00:00
Carlos O'Donell 084442fce3 2006-05-15 Carlos O'Donell <carlos@systemhalted.org>
* sysdeps/hppa/dl-machine.h: Include tls.h
	(elf_machine_fixup_plt): Returns fdesc.
	(elf_machine_profile_fixup_plt): Remove.
	(elf_machine_plt_value): Returns fdesc.
	(elf_machine_runtime_setup): Check that dl_profile != NULL.
	(ARCH_LA_PLTENT, ARCH_LA_PLTEXIT): Define.
	(RTLD_START): Use iitlbp with sr0.
	(elf_machine_type_class): Include TLS relocs.
	(reassemble_21, reassemble_14): Define.
	(elf_machine_rela): Add DIR21L, DIR14R, PLABEL21L, PLABEL14R,
	TLS_DTPMOD32, TLS_TPREL32, TLS_DTPOFF32 support.
	(TRAMPOLINE_TEMPLATE): Move to ...
	* sysdeps/hppa/dl-trampoline.S: ... here.
	* sysdeps/hppa/abort-instr.h: Use iitlbp with sr0.
	* sysdeps/hppa/dl-lookupcfg.h: Inlcude dl-fptr.h.
	(DL_FIXUP_VALUE_TYPE, DL_FIXUP_MAKE_VALUE, DL_FIXUP_VALUE_CODE_ADDR,
	DL_FIXUP_VALUE_ADD, DL_FIXUP_ADDR_VALUE): Define.
	* sysdeps/hppa/sysdep.h: Use "!" as a separator. Cleanup comments.
	* sysdeps/hppa/bits/link.h (La_hppa_regs, La_hppa_retval): Define.
	Define prototypes for la_hppa_gnu_pltenter and la_hppa_gnu_pltexit.
2006-05-14 23:54:47 +00:00
Ulrich Drepper 8608e6698d (TRAMPOLINE_TEMPLATE): Add unwind annotations. 2004-11-19 00:01:25 +00:00
Ulrich Drepper 32e5b41b17 (__hppa_init_bootstrap_fdesc_table):
Initialze the fdesc table for the generic code.
(elf_machine_dynamic): Use asm version.
(elf_machine_load_addresss): Simplify asm by calling
elf_machine_dynamic.
(elf_machine_fixup_plt): Correct comment.
(elf_machine_profile_fixup_plt): New.
(elf_machine_runtime_setup): Check PLT exists, if lazy=1  process
normally, else relocate all the absolute entries.
(RTLD_START): Fix comments.
(TRAMPOLINE_TEMPLATE): Reformat assembly, add return pointer for
calls to profile_fixup.
(ELF_MACHINE_SIZEOF_JMP_SLOT, DL_STATIC_FUNCTION_ADDRESS,
DL_PLATFORM_INIT): Define.
(DL_FUNCTION_ADDRESS): Remove.
(dl_platform_init): New.
(elf_machine_rela): Use generic fdesc code, and process all COPY
relocations. Use __attribute__((always_inline)).
(elf_machine_rela_relative): Add sanity checks, remove IPLT
processing, print error message in default case. Use
__attribute__((always_inline)).
(elf_machine_lazy_rel): Use __attribute__((always_inline)).
2004-04-17 22:53:29 +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
Ulrich Drepper 926092e807 Define macro DO_ELF_MACHINE_REL_RELATIVE for 'elf_machine_rel_relative' with
extra map parameter required by HPPA.
(elf_machine_rela_relative): Add plt relocation changes.
2002-09-28 04:34:00 +00:00
Ulrich Drepper 1b718f413e Don't use multi-line string literals. 2002-06-20 06:23:14 +00:00
Andreas Jaeger c5f8b1a262 (elf_machine_rela): Cast reloc_addr to an integer type before performing
bit operations on it.
2002-06-06 14:16:07 +00:00
Ulrich Drepper ceb7d0bbbe Use rtld_progrname instead of _dl_argv[0]. 2002-03-01 09:43:36 +00:00
Ulrich Drepper dca9c7304b Add HAVE_VISIBILITY_ATTRIBUTE and HAVE_SDATA_SECTION. 2002-02-28 22:36:33 +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 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 638c8659a7 (elf_machine_rela_relative): Rename from elf_machine_rel_relative. 2001-08-24 14:51:50 +00:00
Ulrich Drepper 85bdccdbd2 Define elf_machine_rel_relative. Minor optimizations. 2001-08-24 08:43:21 +00:00
Andreas Jaeger 3214b89b32 Update to LGPL v2.1. 2001-07-06 04:56:23 +00:00
Ulrich Drepper 69ab1cbb29 (elf_machine_rela): handle relocs at unaligned address. 2001-06-19 00:42:10 +00:00
Andreas Jaeger 1e48d4f660 Reformat asm statements to remove new gcc warning about multi-line strings. 2001-06-06 11:52:59 +00:00
Ulrich Drepper c9ae5095a4 (RTLD_START): Set up dp with DT_PLTGOT value from application so that
constructors in non-PIC libs work.
(RTLD_START): _dl_init now returns a function pointer, hence load the jump
address and gp from the function pointer before jumping.
2001-04-24 19:38:55 +00:00
Ulrich Drepper 9c56436673 (ELF_MACHINE_START_ADDRESS): Define. 2001-04-22 03:22:03 +00:00
Ulrich Drepper 773b640096 Replace use of old output functions with the new ones. 2001-02-28 06:35:24 +00:00
Ulrich Drepper f1dba30859 (elf_machine_matches_host): Parameter is now pointer to ELF header. 2000-10-20 17:04:28 +00:00
Ulrich Drepper 3eb9e70628 HP/PA specific dynamic linker internals. 2000-10-15 03:20:01 +00:00