elf_machdep.c (95410) | elf_machdep.c (100384) |
---|---|
1/*- 2 * Copyright 1996-1998 John D. Polstra. 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 --- 8 unchanged lines hidden (view full) --- 17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * | 1/*- 2 * Copyright 1996-1998 John D. Polstra. 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 --- 8 unchanged lines hidden (view full) --- 17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * |
25 * $FreeBSD: head/sys/i386/i386/elf_machdep.c 95410 2002-04-25 01:22:16Z marcel $ | 25 * $FreeBSD: head/sys/i386/i386/elf_machdep.c 100384 2002-07-20 02:56:12Z peter $ |
26 */ 27 28#include <sys/param.h> | 26 */ 27 28#include <sys/param.h> |
29#include <sys/kernel.h> |
|
29#include <sys/systm.h> 30#include <sys/linker.h> | 30#include <sys/systm.h> 31#include <sys/linker.h> |
32#include <sys/sysent.h> 33#include <sys/imgact_elf.h> 34#include <sys/syscall.h> 35#include <sys/signalvar.h> 36#include <sys/vnode.h> |
|
31#include <machine/elf.h> | 37#include <machine/elf.h> |
38#include <machine/md_var.h> |
|
32 | 39 |
40struct sysentvec elf32_freebsd_sysvec = { 41 SYS_MAXSYSCALL, 42 sysent, 43 0, 44 0, 45 0, 46 0, 47 0, 48 0, 49 elf32_freebsd_fixup, 50 sendsig, 51 sigcode, 52 &szsigcode, 53 0, 54 "FreeBSD ELF32", 55 __elfN(coredump), 56 NULL, 57 MINSIGSTKSZ 58}; 59 60static Elf32_Brandinfo freebsd_brand_info = { 61 ELFOSABI_FREEBSD, 62 EM_386, 63 "FreeBSD", 64 "", 65 "/usr/libexec/ld-elf.so.1", 66 &elf32_freebsd_sysvec 67 }; 68 69SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, 70 (sysinit_cfunc_t) elf32_insert_brand_entry, 71 &freebsd_brand_info); 72 |
|
33/* Process one elf relocation with addend. */ 34int 35elf_reloc(linker_file_t lf, const void *data, int type) 36{ 37 Elf_Addr relocbase = (Elf_Addr) lf->address; 38 Elf_Addr *where; 39 Elf_Addr addr; 40 Elf_Addr addend; --- 76 unchanged lines hidden --- | 73/* Process one elf relocation with addend. */ 74int 75elf_reloc(linker_file_t lf, const void *data, int type) 76{ 77 Elf_Addr relocbase = (Elf_Addr) lf->address; 78 Elf_Addr *where; 79 Elf_Addr addr; 80 Elf_Addr addend; --- 76 unchanged lines hidden --- |