Changeset 29405ac in mainline for uspace/lib/c/generic/rtld/module.c


Ignore:
Timestamp:
2016-05-16T18:10:00Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bab0f42
Parents:
0dc9a474
Message:

DTPMOD relocations with null symbol name should return the current module index. Implement TPOFF relocations. dltest -n to not run dlfcn tests. Now dltest -n works like a charm. Place TLS images in descending order for variant II just to be safe. Propagate TLS alignment info.

File:
1 edited

Legend:

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

    r0dc9a474 r29405ac  
    189189        m->tdata_size = info.tls.tdata_size;
    190190        m->tbss_size = info.tls.tbss_size;
     191        m->tls_align = info.tls.tls_align;
    191192
    192193        printf("tdata at %p size %zu, tbss size %zu\n",
     
    284285void modules_process_tls(rtld_t *rtld)
    285286{
     287#ifdef CONFIG_TLS_VARIANT_1
    286288        list_foreach(rtld->modules, modules_link, module_t, m) {
    287289                m->ioffs = rtld->tls_size;
    288290                rtld->tls_size += m->tdata_size + m->tbss_size;
    289291        }
     292#else /* CONFIG_TLS_VARIANT_2 */
     293        size_t offs;
     294
     295        list_foreach(rtld->modules, modules_link, module_t, m) {
     296                rtld->tls_size += m->tdata_size + m->tbss_size;
     297        }
     298
     299        offs = 0;
     300        list_foreach(rtld->modules, modules_link, module_t, m) {
     301                offs += m->tdata_size + m->tbss_size;
     302                m->ioffs = rtld->tls_size - offs;
     303        }
     304#endif
    290305}
    291306
Note: See TracChangeset for help on using the changeset viewer.