Add x86_64-linux-gnu emulator
I wanted a tiny scriptable meltdown proof way to run userspace programs and visualize how program execution impacts memory. It helps to explain how things like Actually Portable Executable works. It can show you how the GCC generated code is going about manipulating matrices and more. I didn't feel fully comfortable with Qemu and Bochs because I'm not smart enough to understand them. I wanted something like gVisor but with much stronger levels of assurances. I wanted a single binary that'll run, on all major operating systems with an embedded GPL barrier ZIP filesystem that is tiny enough to transpile to JavaScript and run in browsers too. https://justine.storage.googleapis.com/emulator625.mp4
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#ifndef COSMOPOLITAN_LIBC_SOCK_INTERNAL_H_
|
||||
#define COSMOPOLITAN_LIBC_SOCK_INTERNAL_H_
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/nt/winsock.h"
|
||||
#include "libc/sock/sock.h"
|
||||
@ -145,4 +146,5 @@ forceinline void sockaddr2linux(void *saddr) {
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* !ANSI */
|
||||
#endif /* COSMOPOLITAN_LIBC_SOCK_INTERNAL_H_ */
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#ifndef COSMOPOLITAN_LIBC_SOCK_IPCLASSIFY_H_
|
||||
#define COSMOPOLITAN_LIBC_SOCK_IPCLASSIFY_H_
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
#include "libc/sysv/consts/inaddr.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
@ -65,4 +66,5 @@ forceinline bool ispublicip(int sin_family, void *sin_addr) {
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* !ANSI */
|
||||
#endif /* COSMOPOLITAN_LIBC_SOCK_IPCLASSIFY_H_ */
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#ifndef COSMOPOLITAN_LIBC_SOCK_SOCK_H_
|
||||
#define COSMOPOLITAN_LIBC_SOCK_SOCK_H_
|
||||
#include "libc/bits/bits.h"
|
||||
#include "libc/bits/bswap.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
│ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │
|
||||
│ 02110-1301 USA │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/bits/weaken.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/mem.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
||||
Reference in New Issue
Block a user