Changeset 5035ba05 in mainline for uspace/lib/c/generic/rtld/module.c
- Timestamp:
- 2016-05-02T19:49:51Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32573ff, 9a08e6b
- Parents:
- 634e020
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/rtld/module.c
r634e020 r5035ba05 117 117 } 118 118 } 119 119 120 120 return NULL; /* Not found */ 121 121 } … … 127 127 * Currently this trivially tries to load '/<name>'. 128 128 */ 129 module_t *module_load(rtld_t *rtld, const char *name )129 module_t *module_load(rtld_t *rtld, const char *name, mlflags_t flags) 130 130 { 131 131 elf_finfo_t info; … … 133 133 module_t *m; 134 134 int rc; 135 136 m = malloc(sizeof(module_t));135 136 m = calloc(1, sizeof(module_t)); 137 137 if (!m) { 138 138 printf("malloc failed\n"); … … 141 141 142 142 m->rtld = rtld; 143 if ((flags & mlf_local) != 0) 144 m->local = true; 143 145 144 146 if (str_size(name) > NAME_BUF_SIZE - 2) { … … 185 187 /** Load all modules on which m (transitively) depends. 186 188 */ 187 void module_load_deps(module_t *m )189 void module_load_deps(module_t *m, mlflags_t flags) 188 190 { 189 191 elf_dyn_t *dp; … … 230 232 dm = module_find(m->rtld, dep_name); 231 233 if (!dm) { 232 dm = module_load(m->rtld, dep_name );233 module_load_deps(dm );234 dm = module_load(m->rtld, dep_name, flags); 235 module_load_deps(dm, flags); 234 236 } 235 237
Note:
See TracChangeset
for help on using the changeset viewer.