Deleted Added
full compact
link_elf.c (131928) link_elf.c (132117)
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

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

--- 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/link_elf.c 131928 2004-07-10 21:37:30Z marcel $");
28__FBSDID("$FreeBSD: head/sys/kern/link_elf.c 132117 2004-07-13 19:36:59Z phk $");
29
30#include "opt_gdb.h"
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

487#endif
488 dp = (vm_offset_t)ef->address + *(vm_offset_t *)dynptr;
489 ef->dynamic = (Elf_Dyn *)dp;
490 lf->address = ef->address;
491 lf->size = *(size_t *)sizeptr;
492
493 error = parse_dynamic(ef);
494 if (error) {
29
30#include "opt_gdb.h"
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

487#endif
488 dp = (vm_offset_t)ef->address + *(vm_offset_t *)dynptr;
489 ef->dynamic = (Elf_Dyn *)dp;
490 lf->address = ef->address;
491 lf->size = *(size_t *)sizeptr;
492
493 error = parse_dynamic(ef);
494 if (error) {
495 linker_file_unload(lf);
495 linker_file_unload(lf, LINKER_UNLOAD_FORCE);
496 return error;
497 }
498 link_elf_reloc_local(lf);
499 *result = lf;
500 return (0);
501}
502
503static int

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

841 goto out;
842
843nosyms:
844
845 *result = lf;
846
847out:
848 if (error && lf)
496 return error;
497 }
498 link_elf_reloc_local(lf);
499 *result = lf;
500 return (0);
501}
502
503static int

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

841 goto out;
842
843nosyms:
844
845 *result = lf;
846
847out:
848 if (error && lf)
849 linker_file_unload(lf);
849 linker_file_unload(lf, LINKER_UNLOAD_FORCE);
850 if (shdr)
851 free(shdr, M_LINKER);
852 if (firstpage)
853 free(firstpage, M_LINKER);
854 VOP_UNLOCK(nd.ni_vp, 0, td);
855 vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
856
857 return error;

--- 463 unchanged lines hidden ---
850 if (shdr)
851 free(shdr, M_LINKER);
852 if (firstpage)
853 free(firstpage, M_LINKER);
854 VOP_UNLOCK(nd.ni_vp, 0, td);
855 vn_close(nd.ni_vp, FREAD, td->td_ucred, td);
856
857 return error;

--- 463 unchanged lines hidden ---