Skip to content

upexec: written in ASM it is a 242 bytes static ELF32 #2

Description

@robang74

Hi, nice project. You might be interested in micro pipe exec:

Do the same function of elfexec but upexec written in ASM it is a 242 bytes static ELF32

# Compile and test (simple example)

cc -Os -s hello.c -o hi && du -b hi && gzip -f hi && du -b hi.gz
# 14472 hi
#  1868 hi.gz

nasm -O2 -f bin upexec.asm -o upexec && du -b upexec && chmod a+x upexec
#   242 upexec

export WORLD=beatyful; zcat hi.gz | ./upexec $WORLD; echo $?
# Hello beatyful World!
#   HOME:  /home/roberto
#   WORLD: beatyful
# 0

file upexec
# upexec: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
# statically linked, no section header

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