Changeset 04803bf in mainline for uspace/lib/c/rtld/symbol.c
- Timestamp:
- 2011-03-21T22:00:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 143932e3
- Parents:
- b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/rtld/symbol.c
rb50b5af2 r04803bf 37 37 #include <stdio.h> 38 38 #include <stdlib.h> 39 #include <string.h>39 //#include <string.h> 40 40 41 41 #include <rtld.h> … … 60 60 } 61 61 62 static elf_symbol_t *def_find_in_module(c har *name, module_t *m)62 static elf_symbol_t *def_find_in_module(const char *name, module_t *m) 63 63 { 64 64 elf_symbol_t *sym_table; … … 114 114 * that contains the symbol. 115 115 */ 116 elf_symbol_t *symbol_bfs_find(c har *name, module_t *start, module_t **mod)116 elf_symbol_t *symbol_bfs_find(const char *name, module_t *start, module_t **mod) 117 117 { 118 118 module_t *m, *dm; … … 191 191 * that contains the symbol. 192 192 */ 193 elf_symbol_t *symbol_def_find(char *name, module_t *origin, module_t **mod) 194 { 195 module_t *m, *dm; 196 elf_symbol_t *sym, *s; 197 link_t queue_head; 198 size_t i; 193 elf_symbol_t *symbol_def_find(const char *name, module_t *origin, module_t **mod) 194 { 195 elf_symbol_t *s; 199 196 200 197 if (origin->dyn.symbolic) { … … 216 213 /* Program is dynamic -- start with program as root. */ 217 214 return symbol_bfs_find(name, runtime_env->program, mod); 218 } else { 215 } else { 219 216 /* Program is static -- start with @a origin as root. */ 220 217 return symbol_bfs_find(name, origin, mod); … … 222 219 } 223 220 224 uintptr_tsymbol_get_addr(elf_symbol_t *sym, module_t *m)221 void *symbol_get_addr(elf_symbol_t *sym, module_t *m) 225 222 { 226 223 if (sym->st_shndx == SHN_ABS) { 227 224 /* Do not add bias to absolute symbols */ 228 return sym->st_value;225 return (void *) sym->st_value; 229 226 } else { 230 return sym->st_value + m->bias;227 return (void *) (sym->st_value + m->bias); 231 228 } 232 229 }
Note:
See TracChangeset
for help on using the changeset viewer.