Skip to content
Snippets Groups Projects
Verified Commit b13e96ff authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Ensure there is a stub Tcb for dynamically linked binaries

parent f65c1c27
No related branches found
No related tags found
No related merge requests found
Pipeline #10768 failed
......@@ -17,7 +17,7 @@ use crate::{
ALLOCATOR,
};
use super::{access::accessible, debug::_r_debug, linker::Linker, tcb::Tcb, PATH_SEP};
use super::{access::accessible, debug::_r_debug, linker::Linker, tcb::Tcb, ExpectTlsFree, PATH_SEP};
use crate::header::sys_auxv::{AT_ENTRY, AT_PHDR};
use goblin::elf::header::header64::SIZEOF_EHDR;
......@@ -213,6 +213,12 @@ pub extern "C" fn relibc_ld_so_start(sp: &'static mut Stack, ld_entry: usize) ->
}
};
// Ensure there is a stub Tcb
unsafe {
let tcb = Tcb::new(0).expect_notls("failed to allocate TCB");
tcb.activate();
}
// if we are not running in manual mode, then the main
// program is already loaded by the kernel and we want
// to use it. on redox, we treat it the same.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment