Commit Graph

24 Commits

Author SHA1 Message Date
joerg 52a4c27e3e Add _dlauxinfo helper function to provide access to the ELF auxilary
vector. This can normally be found via __ps_strings, but libc is
initialised too early when linked dynamically and doesn't have access to
it yet, so provide an alternative mechanism via ld.elf_so.
Bump libc minor.
2012-02-16 23:00:38 +00:00
nonaka c52f9a5df2 PR/45015: ld.elf_so: support ELF symbol versioning
Applied latest patch.
2011-06-25 05:45:10 +00:00
skrll f1d73a2c94 Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN marked
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3).

Mark libpthread as DF_1_NOOPEN and use it to test the functionality.

Somewhat taken from FreeBSD.

Fixes PR 42029.

OK from christos and joerg.
2010-12-24 12:41:42 +00:00
skrll c6ed7679c0 Typo in comment. 2010-01-07 07:35:35 +00:00
pooka 4c1e54d82b Add Solarisa-like dlinfo() interface to the ELF dynamic linker.
Implement RTLD_DI_LINKMAP which returns a pointer to the linkmap
chain at the given object.  Other Solaris queries are currently
unimplemented.
2009-09-24 21:21:33 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
kleink d5d8554049 Add restrict qualifiers to dlsym() (XSI) and dladdr() arguments. 2005-03-21 13:25:22 +00:00
perry 19b7469a00 de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
2005-02-03 04:39:32 +00:00
skrll 3605f02195 Remove reference to dlinfo - it doesn't exist in NetBSD. 2003-07-01 15:02:01 +00:00
christos 4e9f5413f5 Add RTLD_SELF, RTLD_NEXT, RTLD_DEFAULT, from FreeBSD 2003-05-30 15:44:03 +00:00
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
simonb 3f935d014c Remove 'extern' from function declarations. 2000-06-13 01:21:52 +00:00
thorpej e8050aefef Const'ify dli_saddr in struct _dl_info. 2000-02-11 00:07:14 +00:00
scottb 076e309d3e change first argument of dladdr to const. 2000-02-08 16:22:59 +00:00
kleink 196becef81 Declare dlerror()'s return value __aconst. 1999-05-19 14:50:49 +00:00
pk 7ff8549e41 Assign my copyright to the TNF. 1998-09-05 13:11:07 +00:00
tv 77a275d732 Change ld.so default behavior to RTLD_LOCAL, and make RTLD_LOCAL into a
new flag bit.  Keep RTLD_GLOBAL as an actual flag bit so it won't be
re-used, or may be used for something later.  Mask the dlopen() mode bits
in ld.elf_so so a comparison against RTLD_NOW works.  (RTLD_{LOCAL,GLOBAL}
needs to be implemented for ld.elf_so.)
1998-07-14 22:18:36 +00:00
pk c68cbc9073 Add dladdr() and `Dl_info' structure; interface cloned from Solaris 2. 1998-05-12 21:17:09 +00:00
kleink 7826b591ac Per XSH98, define the RTLD_LOCAL flag. In this implementation it's a NOP,
since non-local searches have to be explicitly enabled via RTLD_GLOBAL.
1998-05-06 20:28:54 +00:00
kleink a681a3706c Protect the dlctl() prototype and the DL_* macros against _XOPEN_SOURCE;
they are neither specified by the XPG nor part of the name space reserved for
implementation-defined use.
1998-03-25 12:21:05 +00:00
pk 5cc521c079 Define RTLD_GLOBAL. 1998-03-15 23:13:42 +00:00
pk ee94541093 Add `const' to dlopen() & dlsym() protos, per PR#2453.
Add RTLD_NOW.
1997-01-02 11:13:19 +00:00
pk 4003f3244b {BEGIN,END}DECLS 1995-06-05 19:38:00 +00:00
pk 878392000d Put dlopen() et.al. declarations in separate header file for compatibility. 1995-06-05 00:08:07 +00:00