Changeset bab0f42 in mainline for uspace/lib/c/generic/rtld/rtld.c


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

Make sure we only go through initial modules when constructing TLS.

File:
1 edited

Legend:

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

    r29405ac rbab0f42  
    4949        runtime_env = &rt_env_static;
    5050        list_initialize(&runtime_env->modules);
     51        list_initialize(&runtime_env->imodules);
    5152        runtime_env->next_bias = 0x2000000;
    5253        runtime_env->program = NULL;
     
    102103        /* Initialize list of loaded modules */
    103104        list_initialize(&env->modules);
     105        list_initialize(&env->imodules);
    104106        list_append(&prog->modules_link, &env->modules);
    105107
     
    156158         */
    157159        offset = 0;
    158         list_foreach(rtld->modules, modules_link, module_t, m) {
     160        list_foreach(rtld->imodules, imodules_link, module_t, m) {
    159161                assert(offset + m->tdata_size + m->tbss_size <= rtld->tls_size);
    160162                memcpy(data + offset, m->tdata, m->tdata_size);
     
    168170         */
    169171        offset = 0;
    170         list_foreach(rtld->modules, modules_link, module_t, m) {
     172        list_foreach(rtld->imodules, imodules_link, module_t, m) {
    171173                assert(offset + m->tdata_size + m->tbss_size <= rtld->tls_size);
    172174                offset += m->tbss_size;
Note: See TracChangeset for help on using the changeset viewer.