Deleted Added
full compact
kern_linker.c (86553) kern_linker.c (90483)
1/*-
2 * Copyright (c) 1997-2000 Doug Rabson
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 *
1/*-
2 * Copyright (c) 1997-2000 Doug Rabson
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/kern/kern_linker.c 86553 2001-11-18 18:19:35Z arr $
26 * $FreeBSD: head/sys/kern/kern_linker.c 90483 2002-02-10 21:29:02Z rwatson $
27 */
28
29#include "opt_ddb.h"
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/malloc.h>

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

1365
1366#define INT_ALIGN(base, ptr) ptr = \
1367 (base) + (((ptr) - (base) + sizeof(int) - 1) & ~(sizeof(int) - 1))
1368
1369/*
1370 * Lookup KLD which contains requested module in the "linker.hints" file.
1371 * If version specification is available, then try to find the best KLD.
1372 * Otherwise just find the latest one.
27 */
28
29#include "opt_ddb.h"
30
31#include <sys/param.h>
32#include <sys/kernel.h>
33#include <sys/systm.h>
34#include <sys/malloc.h>

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

1365
1366#define INT_ALIGN(base, ptr) ptr = \
1367 (base) + (((ptr) - (base) + sizeof(int) - 1) & ~(sizeof(int) - 1))
1368
1369/*
1370 * Lookup KLD which contains requested module in the "linker.hints" file.
1371 * If version specification is available, then try to find the best KLD.
1372 * Otherwise just find the latest one.
1373 *
1374 * XXX: Vnode locking here is hosed; lock should be held for calls to
1375 * VOP_GETATTR() and vn_rdwr().
1373 */
1374static char *
1375linker_hints_lookup(const char *path, int pathlen,
1376 const char *modname, int modnamelen,
1377 struct mod_depend *verinfo)
1378{
1379 struct thread *td = curthread; /* XXX */
1380 struct ucred *cred = td ? td->td_proc->p_ucred : NULL;

--- 369 unchanged lines hidden ---
1376 */
1377static char *
1378linker_hints_lookup(const char *path, int pathlen,
1379 const char *modname, int modnamelen,
1380 struct mod_depend *verinfo)
1381{
1382 struct thread *td = curthread; /* XXX */
1383 struct ucred *cred = td ? td->td_proc->p_ucred : NULL;

--- 369 unchanged lines hidden ---