freebsd-skq/libexec/rtld-elf
Thomas Moestl d05bb9a2a6 Fix the problem that surfaced with the new binutils import on sparc64
(and that is for now being worked around by a binutils patch).

The rtld code tested &_DYNAMIC against 0 to see whether rtld itself
was built as PIC or not. While the sparc64 MD code did not rely
on the preset value of the GOT slot for _DYNAMIC any more due
to previous binutils changes, it still used to not be 0, so
that this check did work. The new binutils do however initialize
this slot with 0. As a consequence, rtld would not properly initialize
itself and crash.
Fix that by introducing a new macro, RTLD_IS_DYNAMIC, to take the role
of this test. For sparc64, it is implemented using the rtld_dynamic()
code that was already there. If an architecture does not provide its
own implementation, we default to the old check.

While being there, mark _DYNAMIC as a weak symbol in the sparc64
rtld_start.S. This is needed in the LDSCRIPT case, which is however
not currently supported for want of an actual ldscript.

Sanity checked with md5 on alpha, amd64, i386 and ia64.
2004-06-18 02:01:37 +00:00
..
alpha Allow threading libraries to register their own locking 2003-05-29 22:58:26 +00:00
amd64 More stack alignment fixes. Arrange so we call _rtld() in ld-elf.so.1 2004-03-21 01:43:39 +00:00
arm Woohoo ! 2004-06-17 17:53:16 +00:00
i386 Allow threading libraries to register their own locking 2003-05-29 22:58:26 +00:00
ia64 Don't fail if we encounter a relocation of type "none". Just ignore 2003-06-07 07:52:17 +00:00
powerpc Allow threading libraries to register their own locking 2003-05-29 22:58:26 +00:00
sparc64 Fix the problem that surfaced with the new binutils import on sparc64 2004-06-18 02:01:37 +00:00
debug.c Fix warnings on 64 bit platforms. 2003-06-19 16:09:18 +00:00
debug.h Add initial support for compiling a special 32 bit version of 2004-03-21 01:21:26 +00:00
libmap.c Support basename and path based constrained matches. 2004-05-24 01:24:13 +00:00
libmap.h Add initial support for compiling a special 32 bit version of 2004-03-21 01:21:26 +00:00
Makefile This comment should have been removed in the previous commit. 2004-06-17 19:01:53 +00:00
malloc.c Very minor style nit: sort include files alphabetically. 2003-08-22 02:22:59 +00:00
map_object.c - Add support for DT_FLAGS. 2003-06-18 03:34:29 +00:00
rtld_lock.c Allow threading libraries to register their own locking 2003-05-29 22:58:26 +00:00
rtld_lock.h Fix warnings; no parameters in function prototypes. 2003-06-19 02:39:37 +00:00
rtld.1 LD_DUMP_REL_PRE and LD_DUMP_REL_POST don't output to stderr; don't 2003-06-19 04:34:09 +00:00
rtld.c Fix the problem that surfaced with the new binutils import on sparc64 2004-06-18 02:01:37 +00:00
rtld.h Add initial support for compiling a special 32 bit version of 2004-03-21 01:21:26 +00:00
xmalloc.c Add function prototypes. 2003-06-19 05:28:26 +00:00