mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-20 17:40:30 +00:00
Make improvements
- Implement openpty() - Add `--assimilate` flag to APE bootloader - Restore Linux vDSO clock_gettime() support - Use `$(APE_NO_MODIFY_SELF)` on more programs
This commit is contained in:
parent
cef50f2a6b
commit
d44ff6ce1f
33 changed files with 600 additions and 251 deletions
|
@ -17,12 +17,16 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/elf/elf.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
void CheckElfAddress(const Elf64_Ehdr *elf, size_t mapsize, intptr_t addr,
|
||||
size_t addrsize) {
|
||||
#if !(TRUSTWORTHY + ELF_TRUSTWORTHY + 0) || ELF_UNTRUSTWORTHY + 0
|
||||
if (addr < (intptr_t)elf || addr + addrsize > (intptr_t)elf + mapsize) {
|
||||
/* kprintf("%p-%p falls outside interval %p-%p", // */
|
||||
/* addr, addr + addrsize, // */
|
||||
/* elf, (char *)elf + mapsize); // */
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
#define COSMOPOLITAN_LIBC_ELF_SCALAR_H_
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
|
||||
#define Elf64_Half uint16_t
|
||||
#define Elf64_Word uint32_t
|
||||
#define Elf64_Sword int32_t
|
||||
#define Elf64_Xword uint64_t
|
||||
#define Elf64_Sxword int64_t
|
||||
#define Elf64_Addr uint64_t
|
||||
#define Elf64_Off uint64_t
|
||||
#define Elf64_Addr uint64_t
|
||||
#define Elf64_Half uint16_t
|
||||
#define Elf64_Off uint64_t
|
||||
#define Elf64_Section uint16_t
|
||||
#define Elf64_Versym Elf64_Half
|
||||
#define Elf64_Sword int32_t
|
||||
#define Elf64_Sxword int64_t
|
||||
#define Elf64_Versym Elf64_Half
|
||||
#define Elf64_Word uint32_t
|
||||
#define Elf64_Xword uint64_t
|
||||
#define Elf_Symndx uint32_t
|
||||
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_ELF_SCALAR_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue