mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Remove malloc() dependency on pledge() / unveil()
This change also fixes a bug with gettid() being incorrect after fork(). We now implement the ENOENT behavior for getauxval(). The getuid() etc. system calls are now faster too. Plus issetugid() will work on BSDs.
This commit is contained in:
parent
c921dc78f0
commit
3d2cf95af1
33 changed files with 270 additions and 100 deletions
|
@ -23,7 +23,8 @@
|
|||
|
||||
noasan int main(int argc, char *argv[]) {
|
||||
int i = 0;
|
||||
Elf64_Ehdr *ehdr = (Elf64_Ehdr *)getauxval(AT_SYSINFO_EHDR);
|
||||
Elf64_Ehdr *ehdr;
|
||||
ehdr = (Elf64_Ehdr *)getauxval(AT_SYSINFO_EHDR);
|
||||
if (isatty(1)) exit(1);
|
||||
for (;;) {
|
||||
write(1, ((char *)ehdr) + i++, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue