Deleted Added
sdiff udiff text old ( 105469 ) new ( 107089 )
full compact
1/*-
2 * Copyright (c) 1998-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/link_elf_obj.c 105469 2002-10-19 19:16:03Z marcel $
27 */
28
29#include "opt_ddb.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/lock.h>
35#include <sys/malloc.h>
36#include <sys/mutex.h>
37#include <sys/proc.h>
38#include <sys/namei.h>
39#include <sys/fcntl.h>
40#include <sys/vnode.h>
41#include <sys/linker.h>
42

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

551 lf = NULL;
552
553 NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, filename, td);
554 flags = FREAD;
555 error = vn_open(&nd, &flags, 0);
556 if (error)
557 return error;
558 NDFREE(&nd, NDF_ONLY_PNBUF);
559
560 /*
561 * Read the elf header from the file.
562 */
563 firstpage = malloc(PAGE_SIZE, M_LINKER, M_WAITOK);
564 if (firstpage == NULL) {
565 error = ENOMEM;
566 goto out;

--- 693 unchanged lines hidden ---