CVS log for src/libexec/rtld-elf/rtld.h
Up to [FreeBSD] / src / libexec / rtld-elf
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Jan 30 19:52:17 2012 UTC (10 days, 5 hours ago) by kib
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -0 lines
SVN rev 230784 on 2012-01-30 19:52:17Z by kib Add support for GNU RELRO. Submitted by: John Marino <draco marino st> MFC after: 2 weeks
Revision 1.54: download - view: text, markup, annotated - select for diffs
Sat Jan 7 16:09:54 2012 UTC (4 weeks, 5 days ago) by uqs
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +1 -1 lines
SVN rev 229780 on 2012-01-07 16:09:54Z by uqs Spelling fixes for libexec/
Revision 1.51.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 4 16:43:29 2012 UTC (5 weeks, 1 day ago) by kib
Branches: RELENG_9
Diff to: previous 1.51.2.2: preferred, colored; branchpoint 1.51: preferred, colored; next MAIN 1.52: preferred, colored
Changes since revision 1.51.2.2: +5 -0 lines
SVN rev 229503 on 2012-01-04 16:43:29Z by kib MFC r228435: Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to rtld on 386 and amd64. MFC r228503: Postpone the resolution for irelative/ifunc right before initializers are called, and drop bind lock around calls to dispatcher. Use initlist to iterate over the objects instead of the ->next, due to drop of the bind lock in iteration. For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch function address for dso, by taking into account possible non-zero relocbase. MFC r228635 (by nwhitehorn): Fix RTLD on PowerPC after r228435. Changing the order of init_pltgot() caused the icache to be invalidated at the wrong time, resulting in an icache full of nonsense in the PLT section.
Revision 1.43.2.4: download - view: text, markup, annotated - select for diffs
Fri Dec 30 20:01:26 2011 UTC (5 weeks, 6 days ago) by kib
Branches: RELENG_8
Diff to: previous 1.43.2.3: preferred, colored; branchpoint 1.43: preferred, colored; next MAIN 1.44: preferred, colored
Changes since revision 1.43.2.3: +1 -1 lines
SVN rev 229018 on 2011-12-30 20:01:26Z by kib MFC r228375: Typo.
Revision 1.51.2.2: download - view: text, markup, annotated - select for diffs
Fri Dec 30 19:59:54 2011 UTC (5 weeks, 6 days ago) by kib
Branches: RELENG_9
Diff to: previous 1.51.2.1: preferred, colored; branchpoint 1.51: preferred, colored
Changes since revision 1.51.2.1: +1 -1 lines
SVN rev 229017 on 2011-12-30 19:59:54Z by kib MFC r228375: Typo.
Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Dec 12 11:03:14 2011 UTC (8 weeks, 3 days ago) by kib
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +5 -0 lines
SVN rev 228435 on 2011-12-12 11:03:14Z by kib Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to rtld on 386 and amd64. This adds runtime bits neccessary for the use of the dispatch functions from the dynamically-linked executables and shared libraries. To allow use of external references from the dispatch function, resolution of the R_MACHINE_IRESOLVE relocations in PLT is postponed until GOT entries for PLT are prepared, and normal resolution of the GOT entries is finished. Similar to how it is done by GNU, IRELATIVE relocations are resolved in advance, instead of normal lazy handling for PLT. Move the init_pltgot() call before the relocations for the object are processed. MFC after: 3 weeks
Revision 1.52: download - view: text, markup, annotated - select for diffs
Fri Dec 9 20:40:24 2011 UTC (2 months ago) by kib
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +1 -1 lines
SVN rev 228375 on 2011-12-09 20:40:24Z by kib Typo. MFC after: 3 days
Revision 1.51.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.51.2.1: preferred, colored; next MAIN 1.51.2.2: preferred, colored
Changes since revision 1.51.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.51.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith Copy head to stable/9 as part of 9.0-RELEASE release cycle. Approved by: re (implicit)
Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Aug 24 20:05:13 2011 UTC (5 months, 2 weeks ago) by kib
Branches: MAIN
CVS tags: RELENG_9_BP
Branch point for: RELENG_9
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +1 -0 lines
SVN rev 225152 on 2011-08-24 20:05:13Z by kib Rtld links with the specially built pic static libc library to get some C runtime services, like printf(). Unfortunately, the multithread-safeness measures in the libc do not work in rtld environment. Rip the kernel printf() implementation and use it in the rtld instead of libc version. This printf does not require any shared global data and thus is mt-safe. Systematically use rtld_printf() and related functions, remove the calls to err(3). Note that stdio is still pulled from libc due to libmap implementaion using fopen(). This is safe but unoptimal, and can be changed later. Reported and tested by: pgj Diagnosed and reviewed by: kan (previous version) Approved by: re (bz)
Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed Feb 9 09:20:27 2011 UTC (12 months ago) by kib
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +1 -1 lines
SVN rev 218476 on 2011-02-09 09:20:27Z by kib Use sigsetjmp/siglongjmp with disabled signal mask access for lock upgrade in rtld. There is no need to care about the mask, which causes a lot of unneeded sigprocmask(2) calls during each symbol lookup.
Revision 1.49: download - view: text, markup, annotated - select for diffs
Sat Jan 8 17:11:49 2011 UTC (13 months ago) by kib
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -0 lines
SVN rev 217153 on 2011-01-08 17:11:49Z by kib In rtld, read the initial stack access mode from AT_STACKPROT as set by kernel, and parse PT_GNU_STACK phdr from linked and loaded dsos. If the loaded dso requires executable stack, as specified by PF_X bit of p_flags of PT_GNU_STACK phdr, but current stack protection does not permit execution, the __pthread_map_stacks_exec symbol is looked up and called. It should be implemented in libc or threading library and change the protection mode of all thread stacks to be executable. Provide a private interface _rtld_get_stack_prot() to export the stack access mode as calculated by rtld. Reviewed by: kan
Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Dec 25 08:51:20 2010 UTC (13 months, 2 weeks ago) by kib
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +40 -5 lines
SVN rev 216695 on 2010-12-25 08:51:20Z by kib Implement support for ELF filters in rtld. Both normal and auxillary filters are implemented. Filtees are loaded on demand, unless LD_LOADFLTR environment variable is set or -z loadfltr was specified during the linking. This forces rtld to upgrade read-locked rtld_bind_lock to write lock when it encounters an object with filter during symbol lookup. Consolidate common arguments of the symbol lookup functions in the SymLook structure. Track the state of the rtld locks in the RtldLockState structure. Pass local RtldLockState through the rtld symbol lookup calls to allow lock upgrades. Reviewed by: kan Tested by: Mykola Dzham <i levsha me>, nwhitehorn (powerpc)
Revision 1.38.2.1.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.38.2.1: preferred, colored; next MAIN 1.38.6.1: preferred, colored
Changes since revision 1.38.2.1: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release. Approved by: re (implicit)
Revision 1.43.2.3.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.43.2.3: preferred, colored; next MAIN 1.43.2.4: preferred, colored
Changes since revision 1.43.2.3: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release. Approved by: re (implicit)
Revision 1.43.2.3: download - view: text, markup, annotated - select for diffs
Wed Nov 10 08:46:29 2010 UTC (15 months ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_2_BP
Branch point for: RELENG_8_2
Diff to: previous 1.43.2.2: preferred, colored; branchpoint 1.43: preferred, colored
Changes since revision 1.43.2.2: +1 -0 lines
SVN rev 215084 on 2010-11-10 08:46:29Z by kib MFC r214728: If dlopen() is called for the dso that has been already loaded as a dependency, then the dso never has its DAG initialized. Empty DAG makes ref_dag() call in dlopen() a nop, and the dso refcount is off by one. Initialize the DAG on the first dlopen() call, using a boolean flag to prevent double initialization. MFC r214776: Fix style. MFC r214777: Change init_dag() to not increment DAG refcount. Unconditionally call both init_dag() and ref_dag() in dlopen() for the case when the object was already loaded.
Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Nov 3 09:23:08 2010 UTC (15 months, 1 week ago) by kib
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -0 lines
SVN rev 214728 on 2010-11-03 09:23:08Z by kib If dlopen() is called for the dso that has been already loaded as a dependency, then the dso never has its DAG initialized. Empty DAG makes ref_dag() call in dlopen() a nop, and the dso refcount is off by one. Initialize the DAG on the first dlopen() call, using a boolean flag to prevent double initialization. From the PR (edited): Assume we have a library liba.so, containing a function a(), and a library libb.so, containing function b(). liba.so needs functionality from libb.so, so liba.so links in libb.so. An application doesn't know about the relation between these libraries, but needs to call a() and b(). It dlopen()s liba.so and obtains a pointer to a(), then it dlopen()s libb.so and obtains a pointer to b(). As soon as the application doesn't need a() anymore, it dlclose()s liba.so. Expected result: the pointer to b() is still valid and can be called Actual result: the pointer to b() has become invalid, even though the application did not dlclose() the handle to libb.so. On calling b(), the application crashes with a segmentation fault. PR: misc/151861 Based on patch by: jh Reviewed by: kan Tested by: Arjan van Leeuwen <freebsd-maintainer opera com> MFC after: 1 week
Revision 1.46: download - view: text, markup, annotated - select for diffs
Sun Sep 12 17:04:51 2010 UTC (16 months, 4 weeks ago) by nwhitehorn
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -0 lines
SVN rev 212497 on 2010-09-12 17:04:51Z by nwhitehorn Check for undefined weak symbols during PLT binding on powerpc64, and do not attempt to copy NULL function descriptors. This fixes LD_BIND_NOW on powerpc64 after r211706. Reviewed by: kib
Revision 1.43.2.2.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 4 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.43.2.2: preferred, colored; next MAIN 1.43.2.3: preferred, colored
Changes since revision 1.43.2.2: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith Copy stable/8 to releng/8.1 in preparation for 8.1-RC1. Approved by: re (implicit)
Revision 1.38.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (2 years ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.38.2.1: preferred, colored; next MAIN 1.38.6.1: preferred, colored
Changes since revision 1.38.2.1: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process. Approved by: re (implicit)
Revision 1.38.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 22 20:20:51 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_7
CVS tags: RELENG_7_4_BP, RELENG_7_3_BP
Branch point for: RELENG_7_4, RELENG_7_3
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +2 -1 lines
SVN rev 200867 on 2009-12-22 20:20:51Z by kib MFC r189959: Implement the dynamic string token substitution in the rpath and soneeded pathes. MFC r190505: Do not dereference NULL pointer. MFC r199828: Flag controlling origin expansion in DT_FLAGS is DF_ORIGIN, not DF_1_ORIGIN. Merge requested by: bms Tested by: bms, Mykola Dzham <freebsd levsha org ua>
Revision 1.43.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 17 19:53:16 2009 UTC (2 years, 1 month ago) by kib
Branches: RELENG_8
CVS tags: RELENG_8_1_BP
Branch point for: RELENG_8_1
Diff to: previous 1.43.2.1: preferred, colored; branchpoint 1.43: preferred, colored
Changes since revision 1.43.2.1: +6 -0 lines
SVN rev 200645 on 2009-12-17 19:53:16Z by kib MFC r199829: Implement rtld part of the support for -z nodlopen (see ld(1)). MFC r199877: Allow to load not-openable dso when tracing. This fixes ldd on such dso or dso linked to non-openable object. Remove '\n' at the end of error message. End comments with dot.
Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Nov 28 14:29:32 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +3 -2 lines
SVN rev 199877 on 2009-11-28 14:29:32Z by kib Allow to load not-openable dso when tracing. This fixes ldd on such dso or dso linked to non-openable object. Remove '\n' at the end of error message. End comments with dot. MFC after: 3 weeks (together with r199829)
Revision 1.44: download - view: text, markup, annotated - select for diffs
Thu Nov 26 13:57:20 2009 UTC (2 years, 2 months ago) by kib
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +5 -0 lines
SVN rev 199829 on 2009-11-26 13:57:20Z by kib Implement rtld part of the support for -z nodlopen (see ld(1)). Reviewed by: kan MFC after: 3 weeks
Revision 1.43.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.43.2.1: preferred, colored; next MAIN 1.43.2.2: preferred, colored
Changes since revision 1.43.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure. Approved by: re (implicit)
Revision 1.43.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith Copy head to stable/8 as part of 8.0 Release cycle. Approved by: re (Implicit)
Revision 1.43: download - view: text, markup, annotated - select for diffs
Sat Jun 20 14:16:41 2009 UTC (2 years, 7 months ago) by kan
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -2 lines
SVN rev 194531 on 2009-06-20 14:16:41Z by kan Allow order of initialization of loaded shared objects to be altered through their .init code. This might happen if init vector calls dlopen on its own and that dlopen causes some not yet initialized object to be initialized earlier as part of that dlopened DAG. Do not reset module reference counts to zero on final fini vector run when process is exiting. Just add an additional parameter to force fini vector invocation regardless of current reference count value if object was not destructed yet. This allows dlclose called from fini vector to proceed normally instead of failing with handle validation error. Reviewed by: kib Reported by: venki kaps
Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed May 27 18:54:31 2009 UTC (2 years, 8 months ago) by dfr
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -1 lines
SVN rev 192922 on 2009-05-27 18:54:31Z by dfr Increase the size of the static TLS area slightly (required for the NVidia's OpenGL driver on amd64).
Revision 1.38.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE. Approved by: re (implicit)
Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Mar 30 08:47:28 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -0 lines
SVN rev 190543 on 2009-03-30 08:47:28Z by kib Implement support for RTLD_NODELETE flag for dlopen() and -z nodelete static linker option. Do it by incrementing reference count on the loaded object and its dependencies. Reviewed by: davidxu, kan
Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Mar 18 13:40:37 2009 UTC (2 years, 10 months ago) by kib
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -1 lines
SVN rev 189959 on 2009-03-18 13:40:37Z by kib Implement the dynamic string token substitution in the rpath and soneeded pathes. The $ORIGIN, $OSNAME, $OSREL and $PLATFORM tokens are supported. Enabling the substitution requires DF_ORIGIN flag in DT_FLAGS or DF_1_ORIGIN if DF_FLAGS_1, that may be set with -z origin gnu ld flag. Translation is unconditionally disabled for setuid/setgid processes. The $ORIGIN translation relies on the AT_EXECPATH auxinfo supplied by kernel. Requested by: maho Tested by: maho, pho Reviewed by: kan
Revision 1.38.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.38: preferred, colored; next MAIN 1.39: preferred, colored
Changes since revision 1.38: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith Create releng/7.1 in preparation for moving into RC phase of 7.1 release cycle. Approved by: re (implicit)
Revision 1.35.2.1.8.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.35.2.1: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35.2.1: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith Create releng/6.4 from stable/6 in preparation for 6.4-RC1. Approved by: re (implicit)
Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Apr 4 20:59:26 2008 UTC (3 years, 10 months ago) by imp
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +5 -0 lines
MFp4: Add mips support for dynamic linking. This code came from the merged mips2 and Juniper mips repositories. Warner Losh, Randall Seager, Oleksandr Tymoshenko and Olivier Houchard worked to merge, debug and integrate this code. This code may also contain code derived from NetBSD.
Revision 1.38: download - view: text, markup, annotated - select for diffs
Tue Apr 3 18:31:20 2007 UTC (4 years, 10 months ago) by kan
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_2_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_2, RELENG_7_1, RELENG_7
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +10 -9 lines
Implement dl_iterate_phdr function. Convert boolean flags in internal Obj_Entry structure into bitfields. Properly check for loaded segment alignment in map_object.
Revision 1.35.2.1: download - view: text, markup, annotated - select for diffs
Fri Dec 30 22:13:56 2005 UTC (6 years, 1 month ago) by marcel
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1
Branch point for: RELENG_6_4
Diff to: previous 1.35: preferred, colored; next MAIN 1.36: preferred, colored
Changes since revision 1.35: +2 -2 lines
MFC standardization of the ELF types and update of the ELF constants: lib/libc/gen/nlist.c:1.19 libexec/rtld-elf/rtld.c:1.108 libexec/rtld-elf/rtld.h:1.36 libexec/rtld-elf/alpha/reloc.c:1.21 libexec/rtld-elf/amd64/reloc.c:1.16 libexec/rtld-elf/ia64/reloc.c:1.16 libexec/rtld-elf/sparc64/reloc.c:1.11 share/man/man5/elf.5:1.32-1.33 sys/alpha/alpha/elf_machdep.c:1.20 sys/amd64/amd64/elf_machdep.c:1.24 sys/boot/common/bootstrap.h:1.42 sys/boot/common/load_elf.c:1.33 sys/boot/common/load_elf_obj.c:1.2 sys/boot/common/reloc_elf.c:1.2 sys/ia64/ia64/elf_machdep.c:1.21 sys/kern/link_elf.c:1.87 sys/kern/link_elf_obj.c:1.90 sys/sparc64/sparc64/elf_machdep.c:1.20 sys/sys/elf32.h:1.9-1.10 sys/sys/elf64.h:1.11-1.13 sys/sys/elf_common.h:1.16 sys/sys/elf_generic.h:1.7 sys/sys/imgact_elf.h:1.28 sys/sys/linker.h:1.40 usr.bin/elf2aout/elf2aout.c:1.10 usr.bin/elfdump/elfdump.c:1.13 usr.sbin/crunch/crunchide/exec_elf32.c:1.15 usr.sbin/kldxref/ef.c:1.9 usr.sbin/kldxref/ef.h:1.6 usr.sbin/kldxref/ef_amd64.c:1.3 usr.sbin/kldxref/ef_i386.c:1.3 usr.sbin/kldxref/ef_obj.c:1.4 usr.sbin/kldxref/ef_powerpc.c:1.3 usr.sbin/kldxref/ef_sparc64.c:1.4-1.5
Revision 1.37: download - view: text, markup, annotated - select for diffs
Sun Dec 18 19:43:32 2005 UTC (6 years, 1 month ago) by kan
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +34 -3 lines
Implement ELF symbol versioning using GNU semantics. This code aims to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Implement dlvsym() function to allow lookups for a specific version of a given symbol.
Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Dec 18 04:52:34 2005 UTC (6 years, 1 month ago) by marcel
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +2 -2 lines
Make our ELF64 type definitions match standards. In particular this means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
Revision 1.34.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 2 09:18:49 2005 UTC (6 years, 11 months ago) by dfr
Branches: RELENG_5
CVS tags: RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4
Diff to: previous 1.34: preferred, colored; next MAIN 1.35: preferred, colored
Changes since revision 1.34: +1 -0 lines
MFC: Attempt to free any static TLS space used by a shared library when it is unloaded. This allows applications which load and unload libraries like libGL.so.1 several times to work properly.
Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Feb 27 12:55:40 2005 UTC (6 years, 11 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +1 -0 lines
Attempt to free any static TLS space used by a shared library when it is unloaded. This allows applications which load and unload libraries like libGL.so.1 several times to work properly. MFC after: 2 days
Revision 1.34: download - view: text, markup, annotated - select for diffs
Tue Aug 3 08:50:58 2004 UTC (7 years, 6 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3
Branch point for: RELENG_5
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +23 -0 lines
Add support for Thread Local Storage.
Revision 1.33: download - view: text, markup, annotated - select for diffs
Sun Mar 21 01:21:26 2004 UTC (7 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +12 -0 lines
Add initial support for compiling a special 32 bit version of ld-elf.so.1 on 64 bit systems. Most of this involves using alternate paths, environment variables and diagnostic messages. The build glue is seperate.
Revision 1.32: download - view: text, markup, annotated - select for diffs
Sun Aug 17 07:55:17 2003 UTC (8 years, 5 months ago) by gordon
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -1 lines
Prepend /lib to the builtin library search path in rtld.
Revision 1.31: download - view: text, markup, annotated - select for diffs
Thu Jun 19 03:55:38 2003 UTC (8 years, 7 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -0 lines
Provide a mechanism for dumping relocation information. Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables cause rtld-elf to output a table of all relocations. This is useful for debugging.
Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Jun 19 02:42:04 2003 UTC (8 years, 7 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +8 -4 lines
Move MD function prototypes together.
Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Jun 19 02:39:37 2003 UTC (8 years, 7 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +1 -1 lines
Fix warnings; no parameters in function prototypes.
Revision 1.28: download - view: text, markup, annotated - select for diffs
Wed Jun 18 03:34:29 2003 UTC (8 years, 7 months ago) by mdodd
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -0 lines
- Add support for DT_FLAGS. - Define various things from the most recent ELF spec.
Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu May 29 22:58:22 2003 UTC (8 years, 8 months ago) by kan
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +2 -1 lines
Allow threading libraries to register their own locking implementation in case default one provided by rtld is not suitable. Consolidate various identical MD lock implementation into a single file using appropriate machine/atomic.h. Approved by: re (scottl)
Revision 1.15.2.6: download - view: text, markup, annotated - select for diffs
Thu Feb 20 20:42:46 2003 UTC (8 years, 11 months ago) by kan
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.15.2.5: preferred, colored; branchpoint 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15.2.5: +3 -3 lines
MFC: Properly remove unloaded objects from all lists.
Implement dlinfo function.
Aproved by: re (murray)
Revision 1.26: download - view: text, markup, annotated - select for diffs
Thu Feb 13 17:47:44 2003 UTC (8 years, 11 months ago) by kan
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +1 -1 lines
Implement dlinfo() function. Introdice RTLD_SELF special handle and properly process it within dlsym() and dlinfo() functions. The intention is to improve our compatibility with Solaris and to make a Java port easier. Partially submitted by: phantom
Revision 1.25: download - view: text, markup, annotated - select for diffs
Thu Feb 13 17:05:10 2003 UTC (8 years, 11 months ago) by kan
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -1 lines
Remove /usr/lib/elf from a default search path. Move xprintf to malloc.c, it is only used there. Make static. Submitted by: phantom
Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Oct 29 10:10:02 2001 UTC (10 years, 3 months ago) by peter
Branches: MAIN
CVS tags: RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
Update rtld for the "new" ia64 ABI. In the old toolchain, the DT_INIT and DT_FINI tags pointed to fptr records. In 2.11.2, it points to the actuall address of the function. On IA64 you cannot just take an address of a function, store it in a function pointer variable and call it.. the function pointers point to a fptr data block that has the target gp and address in it. This is absolutely necessary for using the in-tree binutils toolchain, but (unfortunately) will not work with old shared libraries. Save your old ld-elf.so.1 if you want to use old ones still. Do not mix-and-match. This is a no-op change for i386 and alpha. Reviewed by: dfr
Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Oct 15 18:48:41 2001 UTC (10 years, 3 months ago) by dfr
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -3 lines
Add ia64 support. Various adjustments were made to existing targets to cope with a few interface changes required by the ia64. In particular, function pointers on ia64 need special treatment in rtld.
Revision 1.15.2.5: download - view: text, markup, annotated - select for diffs
Wed Jul 11 23:59:10 2001 UTC (10 years, 7 months ago) by obrien
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6, RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5, RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.15.2.4: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.4: +3 -2 lines
MFC: * Most of existing include/elf.h is in elf-hints.h.
elf.h is now a compatibility header with Solaris/SVR4.
* Consumers of elf.h now use the minimalist elf header possible.
This change is motivated by Binutils 2.11 and too much clashing over
our base elf headers and the Binutils elf headers.
Revision 1.15.2.4: download - view: text, markup, annotated - select for diffs
Fri May 11 00:57:20 2001 UTC (10 years, 9 months ago) by jdp
Branches: RELENG_4
Diff to: previous 1.15.2.3: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.3: +11 -2 lines
MFC: Performance improvements. Includes the following revisions: rtld.c 1.52 rtld.h 1.22 alpha/reloc.c 1.12 i386/reloc.c 1.7
Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat May 5 23:20:59 2001 UTC (10 years, 9 months ago) by jdp
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +11 -2 lines
Performance improvements for the ELF dynamic linker. These particularly help programs which load many shared libraries with a lot of relocations. Large C++ programs such as are found in KDE are a prime example. While relocating a shared object, maintain a vector of symbols which have already been looked up, directly indexed by symbol number. Typically, symbols which are referenced by a relocation entry are referenced by many of them. This is the same optimization I made to the a.out dynamic linker in 1995 (rtld.c revision 1.30). Also, compare the first character of a sought-after symbol with its symbol table entry before calling strcmp(). On a PII/400 these changes reduce the start-up time of a typical KDE program from 833 msec (elapsed) to 370 msec. MFC after: 5 days
Revision 1.21: download - view: text, markup, annotated - select for diffs
Wed May 2 23:56:18 2001 UTC (10 years, 9 months ago) by obrien
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -2 lines
* include/elf.h has been repo copied to include/elf-hints.h, and it no longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
Revision 1.15.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 22 02:22:52 2000 UTC (11 years, 4 months ago) by jdp
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3, RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE
Diff to: previous 1.15.2.2: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.2: +3 -3 lines
MFC: Add support for dlsym(RTLD_DEFAULT, ...). dlfcn.h: 1.10 -> 1.11 rtld.c: 1.48 -> 1.49 rtld.h: 1.19 -> 1.20
Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Sep 19 04:27:16 2000 UTC (11 years, 4 months ago) by jdp
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -3 lines
Add support for dlsym(RTLD_DEFAULT, ...).
Revision 1.15.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 29 20:26:23 2000 UTC (11 years, 6 months ago) by jdp
Branches: RELENG_4
Diff to: previous 1.15.2.1: preferred, colored; branchpoint 1.15: preferred, colored
Changes since revision 1.15.2.1: +3 -9 lines
MFC: Call init and fini functions in a proper order based on the
interdependencies of the shared libraries. Includes these revisions:
rtld.c 1.47
rtld.h 1.19
Revision 1.19: download - view: text, markup, annotated - select for diffs
Wed Jul 26 04:24:40 2000 UTC (11 years, 6 months ago) by jdp
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -9 lines
Revamp the code that calls shared libraries' init and fini functions. Formerly the init functions were called in the opposite of the order in which libraries were loaded, and libraries were loaded according to a breadth-first traversal of the dependency graph. That ordering came from SVR4.0, and it was easy to implement but not always sensible. Now we do a depth-first walk over the dependency graph and call the init functions in an order such that each shared object's needed objects are initialized before the shared object itself. At the same time we build a list of finalization (fini) functions in the opposite order, to guarantee correct C++ destructor ordering whenever possible. (It may not be possible if dlopen and dlclose are used in strange ways, but we come as close as one can come.) The need for this renovation has become apparent as more programs have started using multithreading. The multithreaded C library libc_r requires initialization, whereas the standard libc does not. Since virtually every other object depends on the C library, it is important that it get initialized first.
Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 12 04:48:56 2000 UTC (11 years, 7 months ago) by jdp
Branches: RELENG_4
CVS tags: RELENG_4_1_0_RELEASE
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +19 -6 lines
MFC: Use spinlocks + nanosleep for thread locking to make it work
with all threads packages. Revamp data structures to allow
non-exclusive locking in most cases. Deprecate dllockinit() and
make it a do-nothing stub. Merges in the following deltas:
src/libexec/rtld-elf/rtld.c 1.46
src/libexec/rtld-elf/rtld.h 1.18
src/libexec/rtld-elf/alpha/lockdflt.c 1.5
src/libexec/rtld-elf/alpha/rtld_machdep.h 1.4
src/libexec/rtld-elf/alpha/rtld_start.S 1.4
src/libexec/rtld-elf/i386/lockdflt.c 1.5
src/libexec/rtld-elf/i386/rtld_machdep.h 1.4
Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Jul 8 04:10:30 2000 UTC (11 years, 7 months ago) by jdp
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +19 -6 lines
Solve the dynamic linker's problems with multithreaded programs once and for all (I hope). Packages such as wine, JDK, and linuxthreads should no longer have any problems with re-entering the dynamic linker. This commit replaces the locking used in the dynamic linker with a new spinlock-based reader/writer lock implementation. Brian Fundakowski Feldman <green> argued for this from the very beginning, but it took me a long time to come around to his point of view. Spinlocks are the only kinds of locks that work with all thread packages. But on uniprocessor systems they can be inefficient, because while a contender for the lock is spinning the holder of the lock cannot make any progress toward releasing it. To alleviate this disadvantage I have borrowed a trick from Sleepycat's Berkeley DB implementation. When spinning for a lock, the requester does a nanosleep() call for 1 usec. each time around the loop. This will generally yield the CPU to other threads, allowing the lock holder to finish its business and release the lock. I chose 1 usec. as the minimum sleep which would with reasonable certainty not be rounded down to 0. The formerly machine-independent file "lockdflt.c" has been moved into the architecture-specific subdirectories by repository copy. It now contains the machine-dependent spinlocking code. For the spinlocks I used the very nifty "simple, non-scalable reader-preference lock" which I found at <http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html> on all CPUs except the 80386 (the specific CPU model, not the architecture). The 80386 CPU doesn't support the necessary "cmpxchg" instruction, so on that CPU a simple exclusive test-and-set lock is used instead. 80386 CPUs are detected at initialization time by trying to execute "cmpxchg" and catching the resulting SIGILL signal. To reduce contention for the locks, I have revamped a couple of key data structures, permitting all common operations to be done under non-exclusive (reader) locking. The only operations that require exclusive locking now are the rare intrusive operations such as dlopen() and dlclose(). The dllockinit() interface is now deprecated. It still exists, but only as a do-nothing stub. I plan to remove it as soon as is reasonably possible. (From the very beginning it was clearly labeled as experimental and subject to change.) As far as I know, only the linuxthreads port uses dllockinit(). This interface turned out to have several problems. As one example, when the dynamic linker called a client-supplied locking function, that function sometimes needed lazy binding, causing re-entry into the dynamic linker and a big looping mess. And in any case, it turned out to be too burdensome to require threads packages to register themselves with the dynamic linker.
Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri May 26 02:00:39 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -5 lines
Back out the previous change to the queue(3) interface. It was not discussed and should probably not happen. Requested by: msmith and others
Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue May 23 20:33:42 2000 UTC (11 years, 8 months ago) by jake
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +5 -5 lines
Change the way that the queue(3) structures are declared; don't assume that the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Jan 29 01:26:59 2000 UTC (12 years ago) by jdp
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -2 lines
When a threads package registers locking methods with dllockinit(), figure out which shared object(s) contain the the locking methods and fully bind those objects as if they had been loaded with LD_BIND_NOW=1. The goal is to keep the locking methods from requiring any lazy binding. Otherwise infinite recursion occurs in _rtld_bind. This fixes the infinite recursion problem in the linuxthreads port.
Revision 1.5.2.6: download - view: text, markup, annotated - select for diffs
Fri Jan 21 02:31:51 2000 UTC (12 years ago) by jdp
Branches: RELENG_3
CVS tags: RELENG_3_5_0_RELEASE
Diff to: previous 1.5.2.5: preferred, colored; branchpoint 1.5: preferred, colored; next MAIN 1.6: preferred, colored
Changes since revision 1.5.2.5: +20 -4 lines
Sync with -current: add locking support to the dynamic linker.
Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jan 9 21:13:48 2000 UTC (12 years, 1 month ago) by jdp
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +16 -4 lines
Revamp the mechanism for enumerating and calling shared objects' init and fini functions. Now the code is very careful to hold no locks when calling these functions. Thus the dynamic linker cannot be re-entered with a lock already held. Remove the tolerance for recursive locking that I added in revision 1.2 of dllockinit.c. Recursive locking shouldn't happen any more. Mozilla and JDK users: I'd appreciate confirmation that things still work right (or at least the same) with these changes.
Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Dec 27 04:44:02 1999 UTC (12 years, 1 month ago) by jdp
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -1 lines
Add a new function dllockinit() for registering thread locking functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soon. Also add a default locking method that is used up until dllockinit() is called. The default method works by blocking SIGVTALRM, SIGPROF, and SIGALRM in critical sections. It is based on the observation that most user-space threads packages implement thread preemption with one of these signals (usually SIGVTALRM). The dynamic linker has never been reentrant, but it became less reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c". Starting with that revision, multiple threads each doing lazy binding could interfere with each other. The usual symptom was that a symbol was falsely reported as undefined at start-up time. It was rare but not unseen. This commit fixes it.
Revision 1.5.2.5: download - view: text, markup, annotated - select for diffs
Fri Dec 17 01:47:14 1999 UTC (12 years, 1 month ago) by jkh
Branches: RELENG_3
CVS tags: RELENG_3_4_0_RELEASE
Diff to: previous 1.5.2.4: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.4: +25 -4 lines
MFC: fixes for dlopen() which allow mozilla to actually work in -stable.
/usr/bin/id ran just fine after these changes, so jdp says "ship it." :)
Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun Sep 5 21:12:53 1999 UTC (12 years, 5 months ago) by jdp
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +10 -6 lines
Make jdk-1.1.8 work again. It turns out that some code inside libjava peeks into the dynamic linker's private Obj_Entry structures. My recent changes introduced some new members near the front of the structures, causing libjava to get the wrong fields. This commit moves the new members toward the end of the structure so that the layout of the portion that is relevant to JDK remains the same as before. I will work with the JDK porting team to see if we can come up with a less fragile way for them to do what they need to do. I understand the current approach was necessary in order to work around some limitations of the dynamic linker. Maybe it's not necessary any more.
Revision 1.11: download - view: text, markup, annotated - select for diffs
Mon Aug 30 01:54:13 1999 UTC (12 years, 5 months ago) by jdp
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +2 -1 lines
Get the actual pathname of the dynamic linker from the executable's PT_INTERP program header entry, to ensure that gdb always finds the right dynamic linker. Use obj->relocbase to simplify a few calculations where appropriate.
Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Aug 30 01:50:41 1999 UTC (12 years, 5 months ago) by jdp
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +5 -2 lines
When checking to see if a shared object is already loaded, look for a device/inode match if no pathname match is found.
Revision 1.9: download - view: text, markup, annotated - select for diffs
Mon Aug 30 01:48:11 1999 UTC (12 years, 5 months ago) by jdp
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +16 -3 lines
Revamp the symbol lookup algorithm to cope better with objects
loaded separately by dlopen that have global symbols with identical
names. Viewing each dlopened object as a DAG which is linked by its
DT_NEEDED entries in the dynamic table, the search order is as
follows:
* If the referencing object was linked with -Bsymbolic, search it
internally.
* Search all dlopened DAGs containing the referencing object.
* Search all objects loaded at program start up.
* Search all objects which were dlopened() using the RTLD_GLOBAL
flag (which is now supported too).
The search terminates as soon as a strong definition is found.
Lacking that, the first weak definition is used.
These rules match those of Solaris, as best I could determine them
from its vague manual pages and the results of experiments I performed.
PR: misc/12438
Revision 1.5.2.4: download - view: text, markup, annotated - select for diffs
Sun Aug 29 15:04:09 1999 UTC (12 years, 5 months ago) by peter
Branches: RELENG_3
CVS tags: RELENG_3_3_0_RELEASE
Diff to: previous 1.5.2.3: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.3: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.8: download - view: text, markup, annotated - select for diffs
Sat Aug 28 00:10:11 1999 UTC (12 years, 5 months ago) by peter
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -1 lines
$Id$ -> $FreeBSD$
Revision 1.5.2.3: download - view: text, markup, annotated - select for diffs
Sun Aug 22 17:28:18 1999 UTC (12 years, 5 months ago) by jdp
Branches: RELENG_3
Diff to: previous 1.5.2.2: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.2: +3 -3 lines
MFC: Change many asserts into normal errors. Enable format string
mismatch checking for _rtld_error().
map_object.c: 1.2 -> 1.3
rtld.c: 1.28 -> 1.29
rtld.h: 1.6 -> 1.7
Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Jul 18 00:02:19 1999 UTC (12 years, 6 months ago) by jdp
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
Change many asserts into normal errors. They were all for conditions caused by invalid shared objects rather than by internal errors. Enable format string mismatch checking for _rtld_error().
Revision 1.5.2.2: download - view: text, markup, annotated - select for diffs
Sun May 2 09:36:00 1999 UTC (12 years, 9 months ago) by brian
Branches: RELENG_3
CVS tags: RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE
Diff to: previous 1.5.2.1: preferred, colored; branchpoint 1.5: preferred, colored
Changes since revision 1.5.2.1: +0 -0 lines
MFC: Use realhostname() and trimdomain().
main() returns int
Silence egcs (yeah, I know....)
Reprompt if given an empty login name in uucpd
Correct errno handling in uucpd.
Revision 1.5.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 28 01:19:02 1999 UTC (12 years, 9 months ago) by jdp
Branches: RELENG_3
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +8 -4 lines
MFC (1999/04/08 17:28:44 PDT): Isolate architecture dependencies better. Eliminate some asm(). Make the dynamic linker work if it is built as an executable.
Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Apr 9 00:28:31 1999 UTC (12 years, 10 months ago) by jdp
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +8 -4 lines
Eliminate all machine-dependent code from the main source body and the Makefile, and move it down into the architecture-specific subdirectories. Eliminate an asm() statement for the i386. Make the dynamic linker work if it is built as an executable instead of as a shared library. See i386/Makefile.inc to find out how to do it. Note, this change is not enabled and it might never be enabled. But it might be useful in the future. Building the dynamic linker as an executable should make it start up faster, because it won't have any relocations. But in practice I suspect the difference is negligible.
Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri Sep 4 19:03:57 1998 UTC (13 years, 5 months ago) by dfr
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_1_0_RELEASE, RELENG_3_0_0_RELEASE
Branch point for: RELENG_3
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +20 -3 lines
Add alpha support. Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Sep 2 02:51:12 1998 UTC (13 years, 5 months ago) by jdp
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -1 lines
Suppress duplicate entries in ldd output.
Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Aug 21 03:29:40 1998 UTC (13 years, 5 months ago) by jb
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -12 lines
Update this header to use the revamped elf headers which select Elf32 or Elf64 based on the inclusion of the machine dependent header. I've left the addition of the extra fields to handle the relocation structures with addend for a separate commit after jdp has had a chance to review what I've done. The current change is needed to compile csu/alpha/crt1.c
Revision 1.2: download - view: text, markup, annotated - select for diffs
Thu Apr 30 07:48:02 1998 UTC (13 years, 9 months ago) by dfr
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +4 -1 lines
Add GDB support. The method and some of the code came from NetBSD's elf runtime linker.
Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sat Mar 7 19:24:35 1998 UTC (13 years, 11 months ago) by jdp
Branches: JDP
CVS tags: jdp_1_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
Import the ELF dynamic linker. This is the ElfKit version with quite a few enhancements and bug fixes. There are still some known deficiencies, but it should be adequate to get us started with ELF. Submitted by: John Polstra <jdp@polstra.com>
Revision 1.1: download - view: text, markup, annotated - select for diffs
Sat Mar 7 19:24:35 1998 UTC (13 years, 11 months ago) by jdp
Branches: MAIN
Initial revision
