Ignore:
Timestamp:
2011-04-03T16:31:15Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cf44c14
Parents:
e2098dd7
Message:

Fix mips32 and ppc32 builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/rtld/arch/mips32/src/reloc.c

    re2098dd7 r0e9b512  
    3838#include <stdlib.h>
    3939
    40 #include <arch.h>
    4140#include <elf_dyn.h>
    4241#include <symbol.h>
    4342#include <rtld.h>
     43
     44#include <rtld_arch.h>
    4445
    4546void module_process_pre_arch(module_t *m)
     
    5253        uint32_t *got;
    5354        char *str_tab;
    54         int i, j;
     55        unsigned i, j;
    5556
    5657        uint32_t sym_addr;
     
    124125                sym_def = symbol_def_find(str_tab + sym->st_name, m, &dest);
    125126                if (sym_def) {
    126                         sym_addr = symbol_get_addr(sym_def, dest);
     127                        sym_addr = (uintptr_t) symbol_get_addr(sym_def, dest);
    127128                        DPRINTF("symbol definition found, addr=0x%x\n", sym_addr);
    128129                } else {
     
    142143void rel_table_process(module_t *m, elf_rel_t *rt, size_t rt_size)
    143144{
    144         int i;
     145        unsigned i;
    145146
    146147        size_t rt_entries;
     
    154155        elf_symbol_t *sym;
    155156        uint32_t *r_ptr;
    156         uint16_t *r_ptr16;
     157/*      uint16_t *r_ptr16;*/
    157158        char *str_tab;
    158159       
     
    174175        lgotno = m->dyn.arch.lgotno;
    175176
    176         DPRINTF("got=0x%lx, gotsym=%d\n", (uintptr_t) got, gotsym);
     177        DPRINTF("got=0x%x, gotsym=%d\n", (uintptr_t) got, gotsym);
    177178
    178179        DPRINTF("address: 0x%x, entries: %d\n", (uintptr_t)rt, rt_entries);
     
    193194                rel_type = ELF32_R_TYPE(r_info);
    194195                r_ptr = (uint32_t *)(r_offset + m->bias);
    195                 r_ptr16 = (uint16_t *)(r_offset + m->bias);
     196                /*r_ptr16 = (uint16_t *)(r_offset + m->bias);*/
    196197
    197198                if (sym->st_name != 0) {
     
    200201                        DPRINTF("dest bias: 0x%x\n", dest->bias);
    201202                        if (sym_def) {
    202                                 sym_addr = symbol_get_addr(sym_def, dest);
     203                                sym_addr = (uintptr_t) symbol_get_addr(sym_def,
     204                                    dest);
    203205                                DPRINTF("symbol definition found, addr=0x%x\n", sym_addr);
    204206                        } else {
     
    206208                                continue;
    207209                        }
     210                } else {
     211                        sym_def = NULL;
     212                        sym_addr = 0;
    208213                }
    209214
Note: See TracChangeset for help on using the changeset viewer.