Deleted Added
full compact
link_elf.c (254808) link_elf.c (255426)
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 254808 2013-08-24 21:00:39Z markj $");
28__FBSDID("$FreeBSD: head/sys/kern/link_elf.c 255426 2013-09-09 18:11:59Z jhb $");
29
30#include "opt_ddb.h"
31#include "opt_gdb.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

886#ifdef SPARSE_MAPPING
887 ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT);
888 if (ef->object == NULL) {
889 error = ENOMEM;
890 goto out;
891 }
892 ef->address = (caddr_t) vm_map_min(kernel_map);
893 error = vm_map_find(kernel_map, ef->object, 0,
29
30#include "opt_ddb.h"
31#include "opt_gdb.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#ifdef GPROF
36#include <sys/gmon.h>

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

886#ifdef SPARSE_MAPPING
887 ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT);
888 if (ef->object == NULL) {
889 error = ENOMEM;
890 goto out;
891 }
892 ef->address = (caddr_t) vm_map_min(kernel_map);
893 error = vm_map_find(kernel_map, ef->object, 0,
894 (vm_offset_t *) &ef->address, mapsize, 1,
894 (vm_offset_t *) &ef->address, mapsize, 0, VMFS_OPTIMAL_SPACE,
895 VM_PROT_ALL, VM_PROT_ALL, 0);
896 if (error != 0) {
897 vm_object_deallocate(ef->object);
898 ef->object = 0;
899 goto out;
900 }
901#else
902 ef->address = malloc(mapsize, M_LINKER, M_WAITOK);

--- 703 unchanged lines hidden ---
895 VM_PROT_ALL, VM_PROT_ALL, 0);
896 if (error != 0) {
897 vm_object_deallocate(ef->object);
898 ef->object = 0;
899 goto out;
900 }
901#else
902 ef->address = malloc(mapsize, M_LINKER, M_WAITOK);

--- 703 unchanged lines hidden ---