Changeset 0f792c28 in mainline for uspace/lib/c/arch/ia32/src/rtld/reloc.c
- Timestamp:
- 2016-04-12T16:59:41Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2e9a8a
- Parents:
- 3b0f1b9a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/rtld/reloc.c
r3b0f1b9a r0f792c28 69 69 uint32_t sym_size; 70 70 char *str_tab; 71 71 72 72 elf_symbol_t *sym_def; 73 73 module_t *dest; … … 80 80 81 81 DPRINTF("address: 0x%x, entries: %d\n", (uintptr_t)rt, rt_entries); 82 82 83 83 for (i = 0; i < rt_entries; ++i) { 84 84 // DPRINTF("symbol %d: ", i); … … 100 100 // DPRINTF("rel_type: %x, rel_offset: 0x%x\n", rel_type, r_offset); 101 101 sym_def = symbol_def_find(str_tab + sym->st_name, 102 m, &dest);102 m, ssf_none, &dest); 103 103 // DPRINTF("dest name: '%s'\n", dest->dyn.soname); 104 104 // DPRINTF("dest bias: 0x%x\n", dest->bias); … … 137 137 /* 138 138 * Copy symbol data from shared object to specified 139 * location. 139 * location. Need to find the 'source', i.e. the 140 * other instance of the object than the one in the 141 * executable program. 140 142 */ 141 143 DPRINTF("fixup R_386_COPY (s)\n"); 144 145 sym_def = symbol_def_find(str_tab + sym->st_name, 146 m, ssf_noroot, &dest); 147 148 if (sym_def) { 149 sym_addr = (uint32_t) 150 symbol_get_addr(sym_def, dest); 151 } else { 152 printf("Source definition of '%s' not found.\n", 153 str_tab + sym->st_name); 154 continue; 155 } 156 142 157 sym_size = sym->st_size; 143 158 if (sym_size != sym_def->st_size) { … … 147 162 sym_size = sym_def->st_size; 148 163 } 164 149 165 memcpy(r_ptr, (const void *)sym_addr, sym_size); 150 166 break; 151 167 152 168 case R_386_RELATIVE: 153 169 DPRINTF("fixup R_386_RELATIVE (b+a)\n");
Note:
See TracChangeset
for help on using the changeset viewer.