Ignore:
Timestamp:
2011-04-03T16:31:15Z (14 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/ppc32/src/reloc.c

    re2098dd7 r0e9b512  
    3838#include <stdlib.h>
    3939
    40 #include <arch.h>
    4140#include <elf_dyn.h>
    4241#include <symbol.h>
     
    4443#include <smc.h>
    4544
     45#include <rtld_arch.h>
     46
    4647#define __L(ptr) ((uint32_t)(ptr) & 0x0000ffff)
    4748#define __HA(ptr) ((uint32_t)(ptr) >> 16)
     
    8586{
    8687        uint32_t *plt;
    87         uint32_t *_plt_ent;
     88//      uint32_t *_plt_ent;
    8889       
    8990        /* No lazy linking -- no pre-processing yet. */
     
    9798
    9899        // PLT entries start here. However, each occupies 2 words
    99         _plt_ent = plt + 18;
     100//      _plt_ent = plt + 18;
    100101
    101102        // By definition of the ppc ABI, there's 1:1 correspondence
     
    104105
    105106        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;
    111112        _plt_table = plt + 18 + plt_n;
    112113
     
    136137void rela_table_process(module_t *m, elf_rela_t *rt, size_t rt_size)
    137138{
    138         int i;
     139        unsigned i;
    139140
    140141        size_t rt_entries;
     
    156157
    157158        uint32_t *plt;
    158         uint32_t *_plt_table;
     159//      uint32_t *_plt_table;
    159160        uint32_t *_plt_ent;
    160161        uint32_t plt_n;
     
    166167        plt_n = m->dyn.plt_rel_sz / sizeof(elf_rela_t);
    167168        _plt_ent = plt+ 18;
    168         _plt_table = plt + 18 + plt_n;
     169//      _plt_table = plt + 18 + plt_n;
    169170
    170171        DPRINTF("parse relocation table\n");
     
    201202                        DPRINTF("dest bias: 0x%x\n", dest->bias);
    202203                        if (sym_def) {
    203                                 sym_addr = symbol_get_addr(sym_def, dest);
     204                                sym_addr = (uintptr_t) symbol_get_addr(
     205                                    sym_def, dest);
    204206                                DPRINTF("symbol definition found, addr=0x%x\n", sym_addr);
    205207                        } else {
     
    207209                                continue;
    208210                        }
     211                } else {
     212                        sym_def = NULL;
     213                        sym_addr = 0;
    209214                }
    210215
     
    247252                         */
    248253                        DPRINTF("fixup R_PPC_COPY (s)\n");
     254
    249255                        sym_size = sym->st_size;
    250256                        if (sym_size != sym_def->st_size) {
Note: See TracChangeset for help on using the changeset viewer.