Commit 0c46b2b6 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

Add minexec sources

Not yet in Makefile though.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
parent c28f9a2e
#include "syscal-codes.h"
#define SIGSTOP 19
.code64
.global _start
_start:
1:
/*
* Simply put self into stopped state,
* the restorer will resume us anyway.
*/
movl $__NR_getpid, %eax
syscall
movl %eax, %edi
movl $__NR_kill, %eax
movl $SIGSTOP, %esi
syscall
jmp 1b
OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
OUTPUT_ARCH(i386:x86-64)
SECTIONS
{
. = 0x400000;
ENTRY(_start)
.text : {
*(.text)
. = ALIGN(8);
}
.data ALIGN(0x2000) : {
*(.data)
*(.bss)
. = ALIGN(8);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment