Commit Graph

13 Commits

Author SHA1 Message Date
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
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
matt d71ca2d66e __syscall takes a quad_t as its first argument, not an int.
_strrchr takes an int (due to promotion) as its third arg.
don't print the null byte at the end of string.
error messages should end with a linefeed.
2000-07-03 23:01:01 +00:00
christos 3d65200a80 remove initialization of mainprog_obj from here; it is too late for .ini
sections that want to use dlopen(3).
2000-06-16 20:52:49 +00:00
cgd db755e7c76 sweep of my licenses (userland files w/o only my copyright) for
consistency.  (no functional changes)
2000-06-14 17:24:02 +00:00
cgd d220ca5ba3 fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well.  No functional changes.
2000-06-14 06:48:47 +00:00
minoura 78b105698a Move dl* function definitions to libc on ELF.
Based on the patch supplied by Takuya Shiozaki <tshiozak@astec.co.jp>.
See http://mail-index.netbsd.org/tech-userlevel/2000/02/23/0000.html.
2000-04-02 15:35:47 +00:00
scottb 076e309d3e change first argument of dladdr to const. 2000-02-08 16:22:59 +00:00
scottb c0cf420b69 add hooks to support the dladdr function. 2000-02-07 21:40:40 +00:00
kleink b9f86eb3a1 Namespace cleanup: move runtime linker interface into implementation namespace
and provide weak aliases.
1999-08-19 20:52:36 +00:00
kleink 196becef81 Declare dlerror()'s return value __aconst. 1999-05-19 14:50:49 +00:00
kleink 28d76befd4 When calling dlerror() in a non-dynamically linked executable, return a pointer
to an error string rather than NULL (`no errors occured) to indicate the cause
of failure return values of other dl*() interfaces.
1999-05-19 14:47:12 +00:00
thorpej 3f196ccbc8 Put a good chunk of code common to all ELF crt0.c files into a common
location, and use it.
1999-03-19 23:34:49 +00:00