Skip to content

1200 byte noop #1

@eigood

Description

@eigood
#include <unistd.h>

int _start(void) {
        _exit(42);
}
11:24:50 -0500 adam@tooz:/tmp$ gcc -nostartfiles -static -Wall -s -O3 -o noop noop.c && ls -l noop && ./noop; echo $?
-rwxrwxr-x 1 adam adam 1200 Jul  5 11:24 noop
42

I was aware of http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html when I found your repo, in the compose extends thread, so a bit of googling for a non-assembly based way, that seems easy to understand.

A standard static compile, with strip, was 750k or so on my machine.

The license on this example is public domain. I don't care what anyone does with it, there is nothing of value in any of this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions