Deleted Added
full compact
link_elf_obj.c (131260) link_elf_obj.c (132117)
1/*-
2 * Copyright (c) 1998-2000 Doug Rabson
3 * Copyright (c) 2004 Peter Wemm
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998-2000 Doug Rabson
3 * Copyright (c) 2004 Peter Wemm
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:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/kern/link_elf_obj.c 131260 2004-06-29 03:13:54Z peter $");
29__FBSDID("$FreeBSD: head/sys/kern/link_elf_obj.c 132117 2004-07-13 19:36:59Z phk $");
30
31#include "opt_ddb.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/lock.h>

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

583 error = elf_cpu_load_file(lf);
584 if (error)
585 goto out;
586
587 *result = lf;
588
589out:
590 if (error && lf)
30
31#include "opt_ddb.h"
32#include "opt_mac.h"
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/lock.h>

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

583 error = elf_cpu_load_file(lf);
584 if (error)
585 goto out;
586
587 *result = lf;
588
589out:
590 if (error && lf)
591 linker_file_unload(lf);
591 linker_file_unload(lf, LINKER_UNLOAD_FORCE);
592 if (hdr)
593 free(hdr, M_LINKER);
594 VOP_UNLOCK(nd.ni_vp, 0, td);
595 vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
596
597 return error;
598}
599

--- 364 unchanged lines hidden ---
592 if (hdr)
593 free(hdr, M_LINKER);
594 VOP_UNLOCK(nd.ni_vp, 0, td);
595 vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
596
597 return error;
598}
599

--- 364 unchanged lines hidden ---