Changeset d2bb25e7 in mainline for uspace/lib/c/arch/ia32


Ignore:
Timestamp:
2016-05-17T22:51:37Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9c07c3d
Parents:
e2f26002
Message:

Use DTVs. symbol_get_addr() should not implicitly read current thread pointer.

Location:
uspace/lib/c/arch/ia32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/include/libarch/tls.h

    re2f26002 rd2bb25e7  
    4343        void *self;
    4444        void *fibril_data;
     45        void **dtv;
    4546} tcb_t;
    4647
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    re2f26002 rd2bb25e7  
    101101                        sym_def = symbol_def_find(str_tab + sym->st_name,
    102102                            m, ssf_none, &dest);
    103 //                      DPRINTF("dest name: '%s'\n", dest->dyn.soname);
     103                        DPRINTF("dest name: '%s'\n", dest->dyn.soname);
    104104//                      DPRINTF("dest bias: 0x%x\n", dest->bias);
    105105                        if (sym_def) {
    106106                                sym_addr = (uint32_t)
    107                                     symbol_get_addr(sym_def, dest);
     107                                    symbol_get_addr(sym_def, dest, NULL);
    108108//                              DPRINTF("symbol definition found, addr=0x%x\n", sym_addr);
    109109                        } else {
     
    154154                        if (sym_def) {
    155155                                sym_addr = (uint32_t)
    156                                     symbol_get_addr(sym_def, dest);
     156                                    symbol_get_addr(sym_def, dest, NULL);
    157157                        } else {
    158158                                printf("Source definition of '%s' not found.\n",
  • uspace/lib/c/arch/ia32/src/tls.c

    re2f26002 rd2bb25e7  
    7373#ifdef CONFIG_RTLD
    7474        if (runtime_env != NULL) {
    75                 return rtld_tls_get_addr(runtime_env, ti->ti_module,
    76                     ti->ti_offset);
     75                return rtld_tls_get_addr(runtime_env, __tcb_get(),
     76                    ti->ti_module, ti->ti_offset);
    7777        }
    7878#endif
Note: See TracChangeset for help on using the changeset viewer.