I rather like the vcbprintf design. The callback based approach can't fail, and allows implementing snprintf, asprintf, fprintf on top.
-
-
Aha - did not know that. Feels a little dirty to me.
-
Looks like Sortix executables does happen to map the program headers as well, but I never use them, so that might just be a waste of memory.
End of conversation
New conversation -
-
-
How does the process locate the headers? What other reasons besides TLS?
-
Via auxv slot AT_PHDR. Dwarf unwinding/exception handling also needs program headers for .eh_frame.
-
Right auxv was my guess. Yet to look into .eh_frame. It's just like with TLS, already mapped, libc just needs to find it?
-
Yeah. Normal model is that libgcc_eh/libunwind calls dl_iterate_phdr (in libc) which finds the program headers for main prog & each lib.
-
Then once it has the program headers it can search for PT_GNU_EH_FRAME or whatever it's called.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.