Changeset 0e9b512 in mainline for uspace/lib/c/rtld/arch/ppc32/src/reloc.c
- Timestamp:
- 2011-04-03T16:31:15Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cf44c14
- Parents:
- e2098dd7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/rtld/arch/ppc32/src/reloc.c
re2098dd7 r0e9b512 38 38 #include <stdlib.h> 39 39 40 #include <arch.h>41 40 #include <elf_dyn.h> 42 41 #include <symbol.h> … … 44 43 #include <smc.h> 45 44 45 #include <rtld_arch.h> 46 46 47 #define __L(ptr) ((uint32_t)(ptr) & 0x0000ffff) 47 48 #define __HA(ptr) ((uint32_t)(ptr) >> 16) … … 85 86 { 86 87 uint32_t *plt; 87 uint32_t *_plt_ent;88 // uint32_t *_plt_ent; 88 89 89 90 /* No lazy linking -- no pre-processing yet. */ … … 97 98 98 99 // PLT entries start here. However, each occupies 2 words 99 _plt_ent = plt + 18;100 // _plt_ent = plt + 18; 100 101 101 102 // By definition of the ppc ABI, there's 1:1 correspondence … … 104 105 105 106 uint32_t *_plt_table; 106 uint32_t *_plt_call;107 uint32_t *_plt_resolve;108 109 _plt_resolve = plt;110 _plt_call = plt + 6;107 // uint32_t *_plt_call; 108 // uint32_t *_plt_resolve; 109 110 // _plt_resolve = plt; 111 // _plt_call = plt + 6; 111 112 _plt_table = plt + 18 + plt_n; 112 113 … … 136 137 void rela_table_process(module_t *m, elf_rela_t *rt, size_t rt_size) 137 138 { 138 inti;139 unsigned i; 139 140 140 141 size_t rt_entries; … … 156 157 157 158 uint32_t *plt; 158 uint32_t *_plt_table;159 // uint32_t *_plt_table; 159 160 uint32_t *_plt_ent; 160 161 uint32_t plt_n; … … 166 167 plt_n = m->dyn.plt_rel_sz / sizeof(elf_rela_t); 167 168 _plt_ent = plt+ 18; 168 _plt_table = plt + 18 + plt_n;169 // _plt_table = plt + 18 + plt_n; 169 170 170 171 DPRINTF("parse relocation table\n"); … … 201 202 DPRINTF("dest bias: 0x%x\n", dest->bias); 202 203 if (sym_def) { 203 sym_addr = symbol_get_addr(sym_def, dest); 204 sym_addr = (uintptr_t) symbol_get_addr( 205 sym_def, dest); 204 206 DPRINTF("symbol definition found, addr=0x%x\n", sym_addr); 205 207 } else { … … 207 209 continue; 208 210 } 211 } else { 212 sym_def = NULL; 213 sym_addr = 0; 209 214 } 210 215 … … 247 252 */ 248 253 DPRINTF("fixup R_PPC_COPY (s)\n"); 254 249 255 sym_size = sym->st_size; 250 256 if (sym_size != sym_def->st_size) {
Note:
See TracChangeset
for help on using the changeset viewer.