The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/mips/mips/elf64_machdep.c

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    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
    9  *    notice, this list of conditions and the following disclaimer.
   10  * 2. Redistributions in binary form must reproduce the above copyright
   11  *    notice, this list of conditions and the following disclaimer in the
   12  *    documentation and/or other materials provided with the distribution.
   13  *
   14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   15  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   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  *      from: src/sys/i386/i386/elf_machdep.c,v 1.20 2004/08/11 02:35:05 marcel
   26  */
   27 
   28 #define __ELF_WORD_SIZE 64
   29 
   30 #include <sys/cdefs.h>
   31 __FBSDID("$FreeBSD: releng/8.4/sys/mips/mips/elf64_machdep.c 222846 2011-06-08 03:45:40Z dchagin $");
   32 
   33 #include <sys/param.h>
   34 #include <sys/kernel.h>
   35 #include <sys/systm.h>
   36 #include <sys/exec.h>
   37 #include <sys/imgact.h>
   38 #include <sys/linker.h>
   39 #include <sys/sysent.h>
   40 #include <sys/imgact_elf.h>
   41 #include <sys/proc.h>
   42 #include <sys/syscall.h>
   43 #include <sys/signalvar.h>
   44 #include <sys/vnode.h>
   45 
   46 #include <vm/vm.h>
   47 #include <vm/pmap.h>
   48 #include <vm/vm_param.h>
   49 
   50 #include <machine/elf.h>
   51 #include <machine/md_var.h>
   52 
   53 struct sysentvec elf64_freebsd_sysvec = {
   54         .sv_size        = SYS_MAXSYSCALL,
   55         .sv_table       = sysent,
   56         .sv_mask        = 0,
   57         .sv_sigsize     = 0,
   58         .sv_sigtbl      = NULL,
   59         .sv_errsize     = 0,
   60         .sv_errtbl      = NULL,
   61         .sv_transtrap   = NULL,
   62         .sv_fixup       = __elfN(freebsd_fixup),
   63         .sv_sendsig     = sendsig,
   64         .sv_sigcode     = sigcode,
   65         .sv_szsigcode   = &szsigcode,
   66         .sv_prepsyscall = NULL,
   67         .sv_name        = "FreeBSD ELF64",
   68         .sv_coredump    = __elfN(coredump),
   69         .sv_imgact_try  = NULL,
   70         .sv_minsigstksz = MINSIGSTKSZ,
   71         .sv_pagesize    = PAGE_SIZE,
   72         .sv_minuser     = VM_MIN_ADDRESS,
   73         .sv_maxuser     = VM_MAXUSER_ADDRESS,
   74         .sv_usrstack    = USRSTACK,
   75         .sv_psstrings   = PS_STRINGS,
   76         .sv_stackprot   = VM_PROT_ALL,
   77         .sv_copyout_strings = exec_copyout_strings,
   78         .sv_setregs     = exec_setregs,
   79         .sv_fixlimit    = NULL,
   80         .sv_maxssiz     = NULL,
   81         .sv_flags       = SV_ABI_FREEBSD | SV_LP64,
   82         .sv_set_syscall_retval = cpu_set_syscall_retval,
   83         .sv_fetch_syscall_args = NULL, /* XXXKIB */
   84         .sv_syscallnames = NULL,
   85         .sv_schedtail   = NULL,
   86 };
   87 
   88 static Elf64_Brandinfo freebsd_brand_gnutools_info64 = {
   89         .brand          = ELFOSABI_NONE,
   90         .machine        = EM_MIPS,
   91         .compat_3_brand = "Unix System V ABI",
   92         .emul_path      = NULL,
   93         .interp_path    = "/libexec/ld-elf.so.1",
   94         .sysvec         = &elf64_freebsd_sysvec,
   95         .interp_path    = "/libexec/ld-elf.so.1",
   96         .brand_note     = &elf64_freebsd_brandnote,
   97         .flags          = BI_CAN_EXEC_DYN | BI_BRAND_NOTE
   98 };
   99 
  100 SYSINIT(gnu_mips_elf64, SI_SUB_EXEC, SI_ORDER_ANY,
  101     (sysinit_cfunc_t) elf64_insert_brand_entry,
  102     &freebsd_brand_gnutools_info64);
  103 
  104 static Elf64_Brandinfo freebsd_brand_info64 = {
  105         .brand          = ELFOSABI_FREEBSD,
  106         .machine        = EM_MIPS,
  107         .compat_3_brand = "FreeBSD",
  108         .emul_path      = NULL,
  109         .interp_path    = "/libexec/ld-elf.so.1",
  110         .sysvec         = &elf64_freebsd_sysvec,
  111         .interp_newpath = NULL,
  112         .brand_note     = &elf64_freebsd_brandnote,
  113         .flags          = BI_BRAND_NOTE
  114 };
  115 
  116 SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_FIRST,
  117     (sysinit_cfunc_t) elf64_insert_brand_entry,
  118     &freebsd_brand_info64);
  119 
  120 void
  121 elf64_dump_thread(struct thread *td __unused, void *dst __unused,
  122     size_t *off __unused)
  123 {
  124 }

Cache object: 0ec91f8b9e3ed1d028aa76b7e1c9ec55


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.