mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Implement more security stuff
- Support deterministic stacks on OpenBSD - Support OpenBSD system call origin verification - Fix overrun by one in chibicc string token allocator - Get all chibicc tests passing under Address Sanitizer
This commit is contained in:
parent
cbfd4ccd1e
commit
c843243322
56 changed files with 376 additions and 245 deletions
|
@ -17,6 +17,7 @@
|
|||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "ape/relocations.h"
|
||||
#include "libc/macros.h"
|
||||
|
||||
/**
|
||||
* @fileoverview Cosmopolitan ELF-Normative Linker Script.
|
||||
|
@ -66,6 +67,9 @@ SECTIONS {
|
|||
.text : {
|
||||
*(SORT_BY_ALIGNMENT(.text.hot))
|
||||
KEEP(*(.keep.text))
|
||||
HIDDEN(__text_syscall_start = .);
|
||||
*(.text.syscall .text.syscall.*)
|
||||
HIDDEN(__text_syscall_end = .);
|
||||
*(.text .text.*)
|
||||
KEEP(*(SORT_BY_NAME(.sort.text.*)))
|
||||
}
|
||||
|
@ -207,3 +211,7 @@ SECTIONS {
|
|||
*(.*)
|
||||
}
|
||||
}
|
||||
|
||||
HIDDEN(__text_syscall_addr = ROUNDDOWN(__text_syscall_start, PAGESIZE));
|
||||
HIDDEN(__text_syscall_size = (ROUNDUP(__text_syscall_end, PAGESIZE) -
|
||||
ROUNDDOWN(__text_syscall_start, PAGESIZE)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue