Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset a131536d in mainline


Ignore:
Timestamp:
2019-01-20T00:55:57Z (2 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
eefdd7c
Parents:
b71ec66
Message:

Assert we don't exceed supported number of slots

File:
1 edited

Legend:

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

    rb71ec66 ra131536d  
    9090        elf_symbol_t *sym_def;
    9191        module_t *dest;
     92        uint32_t *plt;
    9293
    9394        DPRINTF("parse relocation table\n");
     
    9697        rt_entries = rt_size / sizeof(elf_rela_t);
    9798        str_tab = m->dyn.str_tab;
     99
     100        plt = (uint32_t *)m->dyn.plt_got;
    98101
    99102        DPRINTF("rel table address: 0x%zx, entries: %zd\n", (uintptr_t)rt, rt_entries);
     
    218221                         * r_ptr points to the PLT entry, sym_addr contains
    219222                         * address of the symbol.
     223                         *
     224                         * XXX This only works for the first 32768 entries.
     225                         * If there are more, the layout is more complex.
    220226                         */
     227                        assert((uint32_t *)r_ptr - plt < 32768 * 8);
    221228                        fill_plt_entry_generic((uint32_t *)r_ptr, sym_addr);
    222229                        smc_coherence(r_ptr, 32);
Note: See TracChangeset for help on using the changeset viewer.