View homework.c
/* gcc -O3 -Wall -Werror homework.c -o homework */ | |
/* Accepts input from stdin. echo "Input String" | homework */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef unsigned char element_t; | |
/* Sort order doesn't really matter */ | |
static int sort_compare(const void *_a, const void *_b) { |
View bin2elf.sh
#!/bin/sh | |
# Convert a raw binary image into an ELF file suitable for loading into a disassembler | |
cat > raw$$.ld <<EOF | |
SECTIONS | |
{ | |
EOF | |
echo " . = $3;" >> raw$$.ld |
View ndless-syscall2addr.py
import sys, os | |
if (len(sys.argv) < 2): | |
print sys.argv[0],"<syscalls.c>" | |
quit() | |
addressList = [] | |
with open(sys.argv[1]) as f: | |
next(f) # Ignore comment line | |
next(f) # Ignore type declaration |