Deleted Added
full compact
elf64_freebsd.c (119482) elf64_freebsd.c (134459)
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
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 Michael Smith <msmith@freebsd.org>
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/boot/i386/libi386/elf64_freebsd.c 119482 2003-08-25 23:28:32Z obrien $");
28__FBSDID("$FreeBSD: head/sys/boot/i386/libi386/elf64_freebsd.c 134459 2004-08-29 00:48:42Z iedowse $");
29
30#define __ELF_WORD_SIZE 64
31#include <sys/param.h>
32#include <sys/exec.h>
33#include <sys/linker.h>
34#include <string.h>
35#include <machine/bootinfo.h>
36#include <machine/elf.h>
37#include <stand.h>
38
39#include "bootstrap.h"
40#include "libi386.h"
41#include "btxv86.h"
42
43static int elf64_exec(struct preloaded_file *amp);
29
30#define __ELF_WORD_SIZE 64
31#include <sys/param.h>
32#include <sys/exec.h>
33#include <sys/linker.h>
34#include <string.h>
35#include <machine/bootinfo.h>
36#include <machine/elf.h>
37#include <stand.h>
38
39#include "bootstrap.h"
40#include "libi386.h"
41#include "btxv86.h"
42
43static int elf64_exec(struct preloaded_file *amp);
44static int elf64_obj_exec(struct preloaded_file *amp);
44
45struct file_format amd64_elf = { elf64_loadfile, elf64_exec };
45
46struct file_format amd64_elf = { elf64_loadfile, elf64_exec };
47struct file_format amd64_elf_obj = { elf64_obj_loadfile, elf64_obj_exec };
46
47#define PG_V 0x001
48#define PG_RW 0x002
49#define PG_U 0x004
50#define PG_PS 0x080
51
52typedef u_int64_t p4_entry_t;
53typedef u_int64_t p3_entry_t;

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

111 printf("Start @ %#llx ...\n", ehdr->e_entry);
112#endif
113
114 dev_cleanup();
115 __exec((void *)VTOP(amd64_tramp), modulep, kernend);
116
117 panic("exec returned");
118}
48
49#define PG_V 0x001
50#define PG_RW 0x002
51#define PG_U 0x004
52#define PG_PS 0x080
53
54typedef u_int64_t p4_entry_t;
55typedef u_int64_t p3_entry_t;

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

113 printf("Start @ %#llx ...\n", ehdr->e_entry);
114#endif
115
116 dev_cleanup();
117 __exec((void *)VTOP(amd64_tramp), modulep, kernend);
118
119 panic("exec returned");
120}
121
122static int
123elf64_obj_exec(struct preloaded_file *fp)
124{
125 return (EFTYPE);
126}