Skip to content

Instantly share code, notes, and snippets.

View basavesh's full-sized avatar
👨‍💻

Basavesh Ammanaghatta Shivakumar basavesh

👨‍💻
View GitHub Profile
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active November 17, 2024 21:11
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,

@MattPD
MattPD / analysis.draft.md
Last active November 12, 2024 06:46
Program Analysis Resources (WIP draft)
@pvdrz
pvdrz / main.rs
Created March 18, 2021 20:32
traverse function calls
// This is required to be able to use the rustc crates.
#![feature(rustc_private)]
// This is only required for the `rustc_*` crates. Regular dependencies can be used without it.
extern crate rustc_driver;
extern crate rustc_hir;
extern crate rustc_interface;
extern crate rustc_middle;
use rustc_driver::{catch_with_exit_code, Callbacks, Compilation, RunCompiler};
@seven1m
seven1m / hello_world_llvm.cpp
Last active November 11, 2024 07:25
Simple 'hello world' example in LLVM IRBuilder
// % clang++ $(llvm-config --cxxflags --ldflags --system-libs --libs core) -o hello_world_llvm hello_world_llvm.cpp
// % ./hello_world_llvm
// hello world
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/ExecutionEngine/GenericValue.h>
#include <llvm/IR/IRBuilder.h>
#include <stdio.h>
using namespace llvm;