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


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

symbol_get_addr() must treat thread-local variables differently than normal variables.

File:
1 edited

Legend:

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

    rbab0f42 re2f26002  
    187187}
    188188
    189 void *rtld_tls_get_addr(rtld_t *rtld, void *tls, unsigned long mod_id,
     189void *rtld_tls_get_addr(rtld_t *rtld, unsigned long mod_id,
    190190    unsigned long offset)
    191191{
    192192        module_t *m;
     193        uint8_t *tls;
    193194
    194195        m = module_by_id(rtld, mod_id);
    195196        assert(m != NULL);
    196197
     198        if (!link_used(&m->imodules_link)) {
     199                printf("module '%s' is not initial. aborting.\n",
     200                    m->dyn.soname);
     201                abort();
     202        }
     203
     204        tls = tls_get();
    197205        return tls + m->ioffs + offset;
    198206}
Note: See TracChangeset for help on using the changeset viewer.