NetBSD/lib/csu
skrll d900731978 Resolve dlsym(3) and friends directly so that dlsym(RTLD_NEXT,...) works.
Previously dlsym resolved to the version in crt0.o or libc which would
mean that the caller's shared object couldn't be determined correctly
using __builtin_return_address(0).

Mainly from FreeBSD, but adapted by me. Benefits of this solutions are:

	- backward comptibility maintained
	- existing broken binaries are fixed with a new ld.elf_so
	- __mainprog_obj can be removed from crt0.o
	- we do the same thing as FreeBSD

Fixes PR 22067.

OKed by Jason and Christos.
2003-08-12 09:18:38 +00:00
..
alpha netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
arm32 ANSIfy and merge some stylistic changes from arm26/crt0.c. 2001-02-18 23:03:34 +00:00
arm_elf %progbits, not @progbits (@ is a comment character in ARM assembly). 2002-01-01 01:36:21 +00:00
c++ change -fpic to -fPIC. Among other things this will let sparc shared 2000-04-29 17:42:46 +00:00
common_aout MKDYNAMICROOT for a.out 2002-11-12 14:33:48 +00:00
common_elf Resolve dlsym(3) and friends directly so that dlsym(RTLD_NEXT,...) works. 2003-08-12 09:18:38 +00:00
hppa netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
i386 More trailing white space. 1999-07-02 15:46:05 +00:00
i386_elf netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
m68k Ajust for new location of a.out crt0 Makefile fragment. 1999-03-19 22:54:40 +00:00
m68k_elf netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
mips Correct a comment. 2002-11-23 17:23:51 +00:00
ns32k Don't use multi-line string literals. 2002-06-05 02:51:03 +00:00
powerpc netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
sh3 add csu for sh3 1999-10-07 11:56:28 +00:00
sh3_elf netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
sh5 Add a work-around for an SH5 binutils bug which results in bogus 2003-04-01 10:20:38 +00:00
sparc Ajust for new location of a.out crt0 Makefile fragment. 1999-03-19 22:54:40 +00:00
sparc64 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
sparc_elf netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
vax Comment out token after #endif. 2002-05-16 19:30:41 +00:00
vax_elf netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
x86_64 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
Makefile ${MACHINE_ARCH} != "arm32" is always true now, so remove it from an if. 2002-05-02 16:42:53 +00:00