Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/rtld/symbol.c

    r5035ba05 rd2bb25e7  
    249249}
    250250
    251 void *symbol_get_addr(elf_symbol_t *sym, module_t *m)
    252 {
    253         if (sym->st_shndx == SHN_ABS) {
     251/** Get symbol address.
     252 *
     253 * @param sym Symbol
     254 * @param m Module contaning the symbol
     255 * @param tcb TCB of the thread whose thread-local variable instance should
     256 *            be returned. If @a tcb is @c NULL then @c NULL is returned for
     257 *            thread-local variables.
     258 *
     259 * @return Symbol address
     260 */
     261void *symbol_get_addr(elf_symbol_t *sym, module_t *m, tcb_t *tcb)
     262{
     263        if (ELF_ST_TYPE(sym->st_info) == STT_TLS) {
     264                if (tcb == NULL)
     265                        return NULL;
     266                return rtld_tls_get_addr(m->rtld, tcb, m->id, sym->st_value);
     267        } else if (sym->st_shndx == SHN_ABS) {
    254268                /* Do not add bias to absolute symbols */
    255269                return (void *) sym->st_value;
Note: See TracChangeset for help on using the changeset viewer.