Ignore:
Timestamp:
2016-05-24T15:32:57Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c170438
Parents:
dcc150cb (diff), 0a981e3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    rdcc150cb rf570cdf  
    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 {
     
    115115                        sym_addr = 0;
    116116                        sym_def = NULL;
     117
     118                        /*
     119                         * DTPMOD with null st_name should return the index
     120                         * of the current module.
     121                         */
     122                        dest = m;
    117123                }
    118124
     
    148154                        if (sym_def) {
    149155                                sym_addr = (uint32_t)
    150                                     symbol_get_addr(sym_def, dest);
     156                                    symbol_get_addr(sym_def, dest, NULL);
    151157                        } else {
    152158                                printf("Source definition of '%s' not found.\n",
     
    171177                        break;
    172178
     179                case R_386_TLS_TPOFF:
     180                        DPRINTF("fixup R_386_TLS_TPOFF\n");
     181                        *r_ptr = (dest->ioffs + sym_def->st_value) - dest->rtld->tls_size;
     182                        break;
     183
     184                case R_386_TLS_DTPOFF32:
     185                        DPRINTF("fixup R_386_TLS_DTPOFF32\n");
     186                        *r_ptr = sym_def->st_value;
     187                        break;
     188
    173189                case R_386_TLS_DTPMOD32:
    174                         /*
    175                          * We can ignore this as long as the only module
    176                          * with TLS variables is libc.so.
    177                          */
    178                         DPRINTF("Ignoring R_386_TLS_DTPMOD32\n");
     190                        DPRINTF("fixup R_386_TLS_DTPMOD32\n");
     191                        *r_ptr = dest->id;
    179192                        break;
    180193
Note: See TracChangeset for help on using the changeset viewer.