An open API service indexing awesome lists of open source software.

https://github.com/heavycircle/minelf

minelf is a NASM compiler to build ultra-minified shellcode-ish ELF binaries.
https://github.com/heavycircle/minelf

Last synced: about 1 year ago
JSON representation

minelf is a NASM compiler to build ultra-minified shellcode-ish ELF binaries.

Awesome Lists containing this project

README

          

# minelf

> An ASM compiler to build ultra-minified shellcode-ish ELF files.

Ever needed to write super small ELF files for your assembly scripts? Didn't think so. Anyway...

## Description

More information can be found on its [blog post](https://ironforgecyber.com/blog/minelf).

## Usage

`minelf` comes with minimal compilation options.

```bash
usage: minelf [-h] [-o OUTFILE] [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] infile

Minified compilation of a NASM script.

positional arguments:
infile Assembly file to compile

options:
-h, --help show this help message and exit
-o OUTFILE, --outfile OUTFILE
Output executable
--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Set the logging level (default: INFO)
```

`minelf` uses the `BITS` directive in the assembly script to determine the architecture. It automatically adds an `ORG` directive to define a load address.

## Future Upgrades

- [ ] Support AT&T syntax.
- [ ] Better support differences in coding style
- [ ] `.data` before `.text`
- [ ] `_start` not first
- [ ] Starting function that's not `_start`