Deleted Added
sdiff udiff text old ( 212497 ) new ( 214728 )
full compact
1/*-
2 * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra.
3 * Copyright 2003 Alexander Kabaev <kan@FreeBSD.ORG>.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/libexec/rtld-elf/rtld.c 212497 2010-09-12 17:04:51Z nwhitehorn $
27 */
28
29/*
30 * Dynamic linker for ELF.
31 *
32 * John Polstra <jdp@polstra.com>.
33 */
34

--- 1235 unchanged lines hidden (view full) ---

1270 return hints[0] != '\0' ? hints : NULL;
1271}
1272
1273static void
1274init_dag(Obj_Entry *root)
1275{
1276 DoneList donelist;
1277
1278 donelist_init(&donelist);
1279 init_dag1(root, root, &donelist);
1280}
1281
1282static void
1283init_dag1(Obj_Entry *root, Obj_Entry *obj, DoneList *dlp)
1284{
1285 const Needed_Entry *needed;
1286
1287 if (donelist_check(dlp, obj))

--- 752 unchanged lines hidden (view full) ---

2040 unload_object(obj);
2041 obj = NULL;
2042 } else {
2043 /* Make list of init functions to call. */
2044 initlist_add_objects(obj, &obj->next, &initlist);
2045 }
2046 } else {
2047
2048 /* Bump the reference counts for objects on this DAG. */
2049 ref_dag(obj);
2050
2051 if (ld_tracing)
2052 goto trace;
2053 }
2054 if (obj != NULL && (nodelete || obj->z_nodelete) && !obj->ref_nodel) {
2055 dbg("obj %s nodelete", obj->path);
2056 ref_dag(obj);
2057 obj->z_nodelete = obj->ref_nodel = true;

--- 1622 unchanged lines hidden ---