dlfcn.c (283153) | dlfcn.c (288008) |
---|---|
1/*- 2 * Copyright (c) 1998 John D. Polstra 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 John D. Polstra 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/libc/gen/dlfcn.c 283153 2015-05-20 15:37:15Z kib $"); | 28__FBSDID("$FreeBSD: head/lib/libc/gen/dlfcn.c 288008 2015-09-20 03:58:27Z rodrigc $"); |
29 30/* 31 * Linkage to services provided by the dynamic linker. 32 */ 33#include <sys/mman.h> 34#include <dlfcn.h> 35#include <link.h> 36#include <stddef.h> 37#include "namespace.h" 38#include <pthread.h> 39#include "un-namespace.h" 40#include "libc_private.h" 41 42static char sorry[] = "Service unavailable"; 43 | 29 30/* 31 * Linkage to services provided by the dynamic linker. 32 */ 33#include <sys/mman.h> 34#include <dlfcn.h> 35#include <link.h> 36#include <stddef.h> 37#include "namespace.h" 38#include <pthread.h> 39#include "un-namespace.h" 40#include "libc_private.h" 41 42static char sorry[] = "Service unavailable"; 43 |
44void _rtld_thread_init(void * li); 45void _rtld_atfork_pre(int *locks); 46void _rtld_atfork_post(int *locks); 47 |
|
44/* 45 * For ELF, the dynamic linker directly resolves references to its 46 * services to functions inside the dynamic linker itself. These 47 * weak-symbol stubs are necessary so that "ld" won't complain about 48 * undefined symbols. The stubs are executed only when the program is 49 * linked statically, or when a given service isn't implemented in the 50 * dynamic linker. They must return an error if called, and they must 51 * be weak symbols so that the dynamic linker can override them. --- 186 unchanged lines hidden --- | 48/* 49 * For ELF, the dynamic linker directly resolves references to its 50 * services to functions inside the dynamic linker itself. These 51 * weak-symbol stubs are necessary so that "ld" won't complain about 52 * undefined symbols. The stubs are executed only when the program is 53 * linked statically, or when a given service isn't implemented in the 54 * dynamic linker. They must return an error if called, and they must 55 * be weak symbols so that the dynamic linker can override them. --- 186 unchanged lines hidden --- |