~vojtech-horky/helenos/helenos-qemu

« back to all changes in this revision

Viewing changes to uspace/lib/c/generic/elf/elf_load.c

  • Committer: Vojtech Horky
  • Date: 2017-06-14 06:22:31 UTC
  • mfrom: (2103.1.569 HelenOS.mainline)
  • Revision ID: vojtechhorky@users.sourceforge.net-20170614062231-q4ui9pyxp0gs2hrl
MergeĀ mainlineĀ changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
#include <errno.h>
41
41
#include <stdio.h>
42
42
#include <stdlib.h>
 
43
#include <vfs/vfs.h>
43
44
 
44
45
#ifdef CONFIG_RTLD
45
46
#include <rtld/rtld.h>
49
50
 
50
51
/** Load ELF program.
51
52
 *
52
 
 * @param file_name File name
 
53
 * @param file File handle 
53
54
 * @param info Place to store ELF program information
54
55
 * @return EOK on success or non-zero error code
55
56
 */
56
 
int elf_load(const char *file_name, elf_info_t *info)
 
57
int elf_load(int file, elf_info_t *info)
57
58
{
58
59
#ifdef CONFIG_RTLD
59
60
        rtld_t *env;
60
61
#endif
61
62
        int rc;
62
63
 
63
 
        rc = elf_load_file(file_name, 0, 0, &info->finfo);
 
64
        rc = elf_load_file(file, 0, 0, &info->finfo);
64
65
        if (rc != EE_OK) {
65
66
                DPRINTF("Failed to load executable '%s'.\n", file_name);
66
67
                return rc;