/*
 * ELF loader for Milo - currently just a dummy
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1995 by Ralf Baechle
 */
#include <stand/stdio.h>
#include <sys/types.h>
#include <stand/loader.h>

/*
 * Read a symbol from the kernel executable - dummy
 */
static struct nlist *elf_get_nlist(char *symbol)
{
    return NULL;
}

/*
 * Return a pointer to the internal symbol
 */
static char *elf_ld_isymbol(char *symbol)
{
    /*
     * Do nothing - unlike a.out ELF has no underscore as prefix
     */
    return symbol;
}

/*
 * Return base address for the loaded kernel - dummy
 */
static u_long elf_get_kbase(void)
{
    return (u_long) NULL;
}

/*
 * Return size of kernel code + data - dummy
 */
static u_long elf_get_ksize(void)
{
    return (u_long) 0;
}

/*
 * Load ELF kernel into memory - dummy
 */
static int elf_load_kernel(void *mem)
{
    return -1;
}

/*
 * Print some statistics about the kernel - dummy
 */
static void elf_print_stats(void)
{
}

static int elf_open_kernel(char *kernel)
{
    return -1;
}

static void elf_close_kernel(void)
{
}

struct loader loader_elf = {
    elf_get_nlist,
    elf_ld_isymbol,
    elf_get_kbase,
    elf_get_ksize,
    elf_load_kernel,
    elf_print_stats,
    elf_open_kernel,
    elf_close_kernel
};
