Changeset 31ea2a7 in mainline for uspace/srv/loader/main.c


Ignore:
Timestamp:
2025-01-26T17:53:49Z (5 months ago)
Author:
Matěj Volf <git@…>
Children:
f215c6ef
Parents:
eff458d
git-author:
Matěj Volf <git@…> (2025-01-25 21:36:13)
git-committer:
Matěj Volf <git@…> (2025-01-26 17:53:49)
Message:

init RTLD runtime at load time even for statically linked binaries

before this, main_fibril of a statically linked binary had wrong thread-local storage

please see PR description for an elaborate explanation of what and why was wrong

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/loader/main.c

    reff458d r31ea2a7  
    300300
    301301#ifdef CONFIG_RTLD
    302         if (prog_info.env) {
    303                 pcb.tcb = rtld_tls_make(prog_info.env);
    304         } else {
    305                 pcb.tcb = tls_make(prog_info.finfo.base);
    306         }
     302        assert(prog_info.env != NULL);
     303        pcb.tcb = rtld_tls_make(prog_info.env);
    307304#else
    308305        pcb.tcb = tls_make(prog_info.finfo.base);
Note: See TracChangeset for help on using the changeset viewer.