mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-04 00:40:27 +00:00
Make improvements
- This commit mints a new release of APE Loader v1.2 which supports loading ELF programs with a non-contiguous virtual address layout even though we've never been able to take advantage of it, due to how `objcopy -SO binary` fills any holes left by PT_LOAD. This'll change soon, since we'll have a new way of creating APE binaries. - The undiamonding trick with our ioctl() implementation is removed since POSIX has been killing ioctl() for years and they've done a much better job. One problem it resolves, is that ioctl(FIONREAD) wasn't working earlier and that caused issues when building Emacs
This commit is contained in:
parent
a1b1fdd1a4
commit
1ee2e89326
53 changed files with 1155 additions and 1255 deletions
20
ape/ape.mk
20
ape/ape.mk
|
@ -197,25 +197,25 @@ o/$(MODE)/ape/loader-xnu-clang.asm: ape/loader.c
|
|||
o/$(MODE)/ape/ape.elf: o/$(MODE)/ape/ape.elf.dbg
|
||||
o/$(MODE)/ape/ape.macho: o/$(MODE)/ape/ape.macho.dbg
|
||||
|
||||
o/$(MODE)/ape/ape.elf.dbg: private \
|
||||
LDFLAGS += \
|
||||
-z common-page-size=0x10 \
|
||||
-z max-page-size=0x10
|
||||
APE_LOADER_LDFLAGS = \
|
||||
-static \
|
||||
-no-pie \
|
||||
-nostdlib \
|
||||
--no-dynamic-linker \
|
||||
-zcommon-page-size=0x1000 \
|
||||
-zmax-page-size=0x1000
|
||||
|
||||
o/$(MODE)/ape/ape.elf.dbg: \
|
||||
o/$(MODE)/ape/loader.o \
|
||||
o/$(MODE)/ape/loader-elf.o \
|
||||
ape/loader.lds
|
||||
@$(ELFLINK)
|
||||
@$(COMPILE) -ALINK.elf $(LINK) -T ape/loader.lds $(APE_LOADER_LDFLAGS) -o $@ o/$(MODE)/ape/loader-elf.o o/$(MODE)/ape/loader.o
|
||||
|
||||
o/$(MODE)/ape/ape.macho.dbg: private \
|
||||
LDFLAGS += \
|
||||
-z common-page-size=0x10 \
|
||||
-z max-page-size=0x10
|
||||
o/$(MODE)/ape/ape.macho.dbg: \
|
||||
o/$(MODE)/ape/loader-xnu.o \
|
||||
o/$(MODE)/ape/loader-macho.o \
|
||||
ape/loader.lds
|
||||
@$(ELFLINK)
|
||||
@$(COMPILE) -ALINK.elf $(LINK) -T ape/loader.lds $(APE_LOADER_LDFLAGS) -o $@ o/$(MODE)/ape/loader-macho.o o/$(MODE)/ape/loader-xnu.o
|
||||
|
||||
.PHONY: o/$(MODE)/ape
|
||||
o/$(MODE)/ape: $(APE_CHECKS) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue