Changeset bb9ec2d in mainline for uspace/lib/c/generic/elf
- Timestamp:
- 2017-03-07T20:47:35Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a737667e
- Parents:
- e796dc8
- git-author:
- Jiri Zarevucky <zarevucky.jiri@…> (2017-03-07 20:47:35)
- git-committer:
- Jakub Jermar <jakub@…> (2017-03-07 20:47:35)
- Location:
- uspace/lib/c/generic/elf
- Files:
-
- 2 edited
-
elf_load.c (modified) (3 diffs)
-
elf_mod.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/elf/elf_load.c
re796dc8 rbb9ec2d 41 41 #include <stdio.h> 42 42 #include <stdlib.h> 43 #include <vfs/vfs.h> 43 44 44 45 #ifdef CONFIG_RTLD … … 50 51 /** Load ELF program. 51 52 * 52 * @param file _name File name53 * @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 … … 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); -
uspace/lib/c/generic/elf/elf_mod.c
re796dc8 rbb9ec2d 92 92 * 93 93 */ 94 static int elf_load_file2(int file, size_t so_bias, eld_flags_t flags, elf_finfo_t *info)94 int elf_load_file(int file, size_t so_bias, eld_flags_t flags, elf_finfo_t *info) 95 95 { 96 96 elf_ld_t elf; … … 112 112 } 113 113 114 int elf_load_file(const char *path, size_t so_bias, eld_flags_t flags, elf_finfo_t *info) 114 int elf_load_file_name(const char *path, size_t so_bias, eld_flags_t flags, 115 elf_finfo_t *info) 115 116 { 116 117 int file = vfs_lookup(path); 117 int rc = elf_load_file 2(file, so_bias, flags, info);118 int rc = elf_load_file(file, so_bias, flags, info); 118 119 close(file); 119 120 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.
