This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working builds for macOS, still segfaults on assert
- Loading branch information
Showing
1,040 changed files
with
501 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/include/boost DESTINATION ${CMAKE_BINARY_DIR}/include) | ||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/boost DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/) | ||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/include/boost DESTINATION ${BASE_BINARY_DIR}/include) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
file(GLOB SOURCES _crt.s crt.cpp) | ||
project(crt LANGUAGES CXX ASM) | ||
file(GLOB SOURCES macho_crt.s crt.cpp) | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-everything") | ||
|
||
add_native_library(crt | ||
${SOURCES}) | ||
|
||
add_dependencies(crt EosioTools) | ||
target_include_directories(crt PUBLIC ${CMAKE_SOURCE_DIR}) | ||
add_dependencies(crt native_eosio) | ||
|
||
install(TARGETS crt EXPORT EosioLib | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) | ||
|
||
add_custom_command( TARGET crt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:crt> ${CMAKE_BINARY_DIR}/lib ) | ||
add_custom_command( TARGET crt POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:crt> ${BASE_BINARY_DIR}/lib ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.global _start | ||
.global ____putc | ||
.global __mmap | ||
.global setjmp | ||
.global longjmp | ||
|
||
_start: | ||
mov %rsp, %rbp | ||
mov 0(%rbp), %rdi | ||
lea 8(%rbp), %rsi | ||
call __wrap_main | ||
mov %rax, %rdi | ||
mov $0x200003C, %rax # exit syscall 0x3C or 60 | ||
syscall | ||
|
||
____putc: | ||
dec %rsp | ||
mov %rbx, %r8 | ||
mov %rdi, %rax | ||
mov %al, 0(%rsp) | ||
mov $1, %edi # using stdout | ||
mov %rsp, %rsi # point to the buffer | ||
mov $1, %edx # buffer is only 1 char | ||
mov $0x2000004, %eax # write syscall 0x4 | ||
syscall | ||
inc %rsp | ||
mov %r8, %rbx | ||
ret | ||
|
||
__mmap: | ||
mov $0x20000C5, %eax # mmap syscall 0xC5 or 197 | ||
mov $0, %rdi # don't map | ||
mov $0x6400000, %rsi # size 100Mb | ||
mov $3, %rdx | ||
mov $0x22, %r10 | ||
mov $-1, %r8 | ||
mov $0, %r9 | ||
syscall | ||
ret | ||
|
||
setjmp: | ||
mov %rbx, 0(%rdi) | ||
mov %rbp, 8(%rdi) | ||
mov %r12, 16(%rdi) | ||
mov %r13, 24(%rdi) | ||
mov %r14, 32(%rdi) | ||
mov %r15, 40(%rdi) | ||
lea 8(%rsp), %rdx | ||
mov %rdx, 48(%rdi) | ||
mov (%rsp), %rdx | ||
mov %rdx, 56(%rdi) | ||
xor %rax, %rax | ||
ret | ||
|
||
longjmp: | ||
mov %rsi, %rax | ||
test %rax, %rax | ||
jnz 1f | ||
inc %rax | ||
1: | ||
mov 0(%rdi), %rbx | ||
mov 8(%rdi), %rbp | ||
mov 16(%rdi), %r12 | ||
mov 24(%rdi), %r13 | ||
mov 32(%rdi), %r14 | ||
mov 40(%rdi), %r15 | ||
mov 48(%rdi), %rdx | ||
mov %rdx, %rsp | ||
mov 56(%rdi), %rdx | ||
jmp *%rdx |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.