Deleted Added
full compact
kern_linker.c (178284) kern_linker.c (178380)
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

--- 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) 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

--- 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/sys/kern/kern_linker.c 178284 2008-04-17 19:19:40Z pjd $");
28__FBSDID("$FreeBSD: head/sys/kern/kern_linker.c 178380 2008-04-21 17:22:35Z pjd $");
29
30#include "opt_ddb.h"
31#include "opt_hwpmc_hooks.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>

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

919/*
920 * stack(9) helper for non-debugging environemnts. Unlike DDB helpers, we do
921 * obey locking protocols, and offer a significantly less complex interface.
922 */
923int
924linker_search_symbol_name(caddr_t value, char *buf, u_int buflen,
925 long *offset)
926{
29
30#include "opt_ddb.h"
31#include "opt_hwpmc_hooks.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/kernel.h>
36#include <sys/systm.h>

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

919/*
920 * stack(9) helper for non-debugging environemnts. Unlike DDB helpers, we do
921 * obey locking protocols, and offer a significantly less complex interface.
922 */
923int
924linker_search_symbol_name(caddr_t value, char *buf, u_int buflen,
925 long *offset)
926{
927 int error, locked;
927 int error;
928
928
929 locked = KLD_LOCKED();
930 if (!locked)
931 KLD_LOCK();
929 KLD_LOCK();
932 error = linker_debug_search_symbol_name(value, buf, buflen, offset);
930 error = linker_debug_search_symbol_name(value, buf, buflen, offset);
933 if (!locked)
934 KLD_UNLOCK();
931 KLD_UNLOCK();
935 return (error);
936}
937
938/*
939 * Syscalls.
940 */
941int
942kern_kldload(struct thread *td, const char *file, int *fileid)

--- 1167 unchanged lines hidden ---
932 return (error);
933}
934
935/*
936 * Syscalls.
937 */
938int
939kern_kldload(struct thread *td, const char *file, int *fileid)

--- 1167 unchanged lines hidden ---