Coder Social home page Coder Social logo

elf-binary's People

Contributors

simonracz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

nsinha-git

elf-binary's Issues

Minimize the assembly code

There are some but not all possible size optimizations applied to the assembly code.

One can:

  • only work on 32-bit registers - they are automatically zero-extended to 64-bit
  • update only parts of the lower registers
  • assume the output of the syscall

With them the code boils down to 23 bytes:

  401000:       31 c0                   xor    %eax,%eax
  401002:       b0 01                   mov    $0x1,%al
  401004:       89 c7                   mov    %eax,%edi
  401006:       be 00 10 40 00          mov    $0x401000,%esi
  40100b:       31 d2                   xor    %edx,%edx
  40100d:       b2 07                   mov    $0x7,%dl
  40100f:       0f 05                   syscall
  401011:       31 ff                   xor    %edi,%edi
  401013:       b0 3c                   mov    $0x3c,%al
  401015:       0f 05                   syscall

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.