Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

patha454/prim

Repository files navigation

Style Lint Build

Prim

Prim aims to be a process imager and loader. Right now it's junk.

Building Prim

Prim is built with Cmake.

You can build Prim by running running:

Prim$ cmake -B build .
Prim$ cmake --build build

The build can be customized and controlled through standard Cmake configuration and options.

Contributing

Prim expects all code contributions to pass Continuous Integration (CI) testing which enforces code style and correctness. We recommend you save time by checking your code meets our standards before pushing it. You can use the following commands to check code your code.

Style Checking

You can check your code is formatted to meets our style guide using:

$ find src include -name *.h -o -name *.c | xargs clang-format --style=file -dry-run -Werror

clang-format should produce no errors, returning status code 0.

You can automatically reformat any problematic files to meet our style guide using:

$ clang-format --style=file -i file/to/format

Linting

$ find src include -name *.c -o -name *.h | xargs -i clang-tidy --config="" {} -- -Iinclude

clang-tidy should produce no errors or warnings (suppressed warning from non-user code are okay,) returning status code 0.

Building

$ mkdir build
$ CFLAGS='-W -Wall -Wextra -Wpedantic -std=c99` cmake -B build .
$ cmake --build build [-j8]

Your code should compile under GCC or Clang with strict C99 errors enabled.

Objectives

Prim initially aims to support loading statically linked ELF64 executable, from userspace, on a Linux x86-64 machine.

The aim is to enable performance comparisons between current kernel loaders, and Prim.

Minimum Viable Product.

The minimum viable produced aims to demonstrate basic loading from userspace.

  • Static loading only.
  • ELF64 binaries only.
  • Userspace Linux x86-64 platform.

Roadmap

Further development may include:

  • Dynamic loading and linking.
  • Additional binary formats.
  • Ports to other platforms, including kernel modules.
  • Generating process images. (Core dumps on demand.)
  • Generating binaries from raw data (Object file generation...)

About

Process imager and loader.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published