ThePlexus
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS Bot@lemmy.bestiver.seMB to Lobste.rs@lemmy.bestiver.seEnglish · 12 hours ago

The smallest C binary

blog.weineng.me

external-link
message-square
0
fedilink
0
external-link

The smallest C binary

blog.weineng.me

RSS Bot@lemmy.bestiver.seMB to Lobste.rs@lemmy.bestiver.seEnglish · 12 hours ago
message-square
0
fedilink
I thought of a cute problem: what is the smallest (size) ./a.out binary I can create? Here are some rules the program should follow: ./a.out must run successfully. $? must deterministically be 0. The binary must be produced by GCC only; no post-processing with objcopy, hex editors, or manual patching. We begin with the simplest program possible: // compiled with gcc empty.c int main() { return 0; } This gives us a file size of 15816 bytes (from stat). Not too shabby, but we will need four RAM used in the Apollo guidance computer to fit our binary that does nothing.

Comments

alert-triangle
You must log in or register to comment.

Lobste.rs@lemmy.bestiver.se

lobsters@lemmy.bestiver.se

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
lock
Community locked: only moderators can create posts. You can still comment on posts.

RSS Feed of lobste.rs

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 10 users / week
  • 31 users / month
  • 133 users / 6 months
  • 0 local subscribers
  • 377 subscribers
  • 2.75K Posts
  • 210 Comments
  • Modlog
  • mods:
  • patrick@lemmy.bestiver.se
  • RSS Bot@lemmy.bestiver.se
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org