2020-06-15 07:18:57 -07:00
|
|
|
#ifndef COSMOPOLITAN_LIBC_RUNTIME_INTERNAL_H_
|
|
|
|
#define COSMOPOLITAN_LIBC_RUNTIME_INTERNAL_H_
|
2020-08-25 04:23:25 -07:00
|
|
|
#ifndef __STRICT_ANSI__
|
2020-06-15 07:18:57 -07:00
|
|
|
#include "libc/dce.h"
|
2020-11-25 08:19:00 -08:00
|
|
|
#include "libc/elf/struct/ehdr.h"
|
2020-12-27 07:02:35 -08:00
|
|
|
#include "libc/runtime/ezmap.internal.h"
|
2020-06-15 07:18:57 -07:00
|
|
|
#include "libc/runtime/runtime.h"
|
|
|
|
|
|
|
|
#define STACK_CEIL 0x700000000000ul
|
|
|
|
#define STACK_SIZE FRAMESIZE
|
|
|
|
|
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
|
|
|
|
2021-02-27 12:53:51 -08:00
|
|
|
extern uint32_t __ntconsolemode;
|
|
|
|
extern const char v_ntsubsystem[] __attribute__((__weak__));
|
|
|
|
extern const uintptr_t __fini_array_end[] __attribute__((__weak__));
|
|
|
|
extern const uintptr_t __fini_array_start[] __attribute__((__weak__));
|
2020-06-15 07:18:57 -07:00
|
|
|
|
|
|
|
void _init(void) hidden;
|
|
|
|
void *__cxa_finalize(void *) hidden;
|
2021-02-01 03:33:13 -08:00
|
|
|
void cosmo(int, char **, char **, long (*)[2]) hidden wontreturn;
|
2020-12-05 12:20:41 -08:00
|
|
|
void __stack_chk_fail(void) wontreturn relegated;
|
|
|
|
void __stack_chk_fail_local(void) wontreturn relegated hidden;
|
|
|
|
void _jmpstack(void *, void *, ...) hidden wontreturn;
|
2020-11-09 15:41:11 -08:00
|
|
|
long _setstack(void *, void *, ...) hidden;
|
2020-10-10 21:18:53 -07:00
|
|
|
int GetDosArgv(const char16_t *, char *, size_t, char **, size_t) hidden;
|
2020-11-25 08:19:00 -08:00
|
|
|
Elf64_Ehdr *MapElfRead(const char *, struct MappedFile *) hidden;
|
2020-12-01 03:43:40 -08:00
|
|
|
int GetDosEnviron(const char16_t *, char *, size_t, char **, size_t) hidden;
|
2020-06-15 07:18:57 -07:00
|
|
|
|
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
2020-08-25 04:23:25 -07:00
|
|
|
#endif /* ANSI */
|
2020-06-15 07:18:57 -07:00
|
|
|
#endif /* COSMOPOLITAN_LIBC_RUNTIME_INTERNAL_H_ */
|