项目作者: MikhailProg

项目描述 :
small elf loader
高级语言: C
项目地址: git://github.com/MikhailProg/elf.git
创建时间: 2018-07-24T13:30:34Z
项目社区:https://github.com/MikhailProg/elf

开源协议:MIT License

下载


ELF loader

A small elf loader. It can load static and dynamically linked ELF EXEC and DYN (pie) binaries. The loader is PIE program that doesn’t depend on libc and calls kernel services directly (z_syscall.c).

If the loader needs to load a dynamically linked ELF it places an interpreter (usually ld.so) and a requested binary into a memory and then calls the interpreter entry point.

Build

Default build is for amd64:

  1. $ make

Build for i386:

  1. $ make ARCH=i386

Small build (exclude all messages and printf):

  1. $ make SMALL=1

Load binaries

Run basic hello world test:

  1. $ ./test.sh
  2. default : PASS
  3. static : PASS
  4. pie : PASS
  5. static pie : PASS

Run tests if the loader is built for i386:

  1. $ M32= ./test.sh
  2. ...

Load ls:

  1. $ ./loader /bin/ls

Load galculator:

  1. $ ./loader /usr/bin/galculator