Changeset 40d3604 in mainline for uspace/lib/c/generic/rtld/module.c


Ignore:
Timestamp:
2018-04-30T20:12:50Z (7 years ago)
Author:
GitHub <noreply@…>
Parents:
4c5f04f (diff), 64d38cd (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-04-30 20:12:50)
git-committer:
GitHub <noreply@…> (2018-04-30 20:12:50)
Message:

Merge 64d38cd33ec6817c3a5fdd1a7da6d705b0d9d3a2 into 4c5f04f66aa0d34ff3bbed6e9abebf85f59723fb

File:
1 edited

Legend:

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

    r4c5f04f r40d3604  
    202202        str_cpy(name_buf + 5, NAME_BUF_SIZE - 5, name);
    203203
    204         /* FIXME: need to real allocation of address space */
    205         m->bias = rtld->next_bias;
    206         rtld->next_bias += 0x100000;
    207204
    208205        DPRINTF("filename:'%s'\n", name_buf);
    209         DPRINTF("load '%s' at 0x%zx\n", name_buf, m->bias);
    210 
    211         rc = elf_load_file_name(name_buf, m->bias, ELDF_RW, &info);
     206
     207        rc = elf_load_file_name(name_buf, ELDF_RW, &info);
    212208        if (rc != EE_OK) {
    213209                printf("Failed to load '%s'\n", name_buf);
    214210                exit(1);
    215211        }
     212
     213        m->bias = elf_get_bias(info.base);
     214
     215        DPRINTF("loaded '%s' at 0x%zx\n", name_buf, m->bias);
    216216
    217217        if (info.dynamic == NULL) {
Note: See TracChangeset for help on using the changeset viewer.