• Stars
    star
    132
  • Rank 272,626 (Top 6 %)
  • Language Makefile
  • Created over 9 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Dive into ELF files using simple self-contained examples

ElfHacks

Dive into ELF files using simple self-contained examples.

Examples

# Program Description
backtrace gcc backtrace(3)
bss-section-in-c-and-c++ gcc/g++ .bss
hot-swapping g++ hot swapping of C++ programs
gcc-attribute-alias gcc alias attribute emits an alias for another symbol
gcc-builtin_return_address gcc __builtin_return_address
gcc-finstrument-functions gcc generate instrumentation calls for entry and exit to functions
gcc-nostdlib gcc do not use standard system startup files or libraries
gcc-pie gcc produce a position independent executable (IMHO, like PIC+Bsymbolic)
gcc-static gcc statically linked executable
get-got-address readelf,objdump get GOT address of functions or variables
get-plt-address readelf,objdump get PLT address of functions
g++-inline-means-weak-symbol g++ inline functions translated to weak symbols
implicit-inline-member-function g++ member functions defined in classes are implicitly inline
ld-Bsymbolic ld -Bsymbolic binds references to local symbols
ld-dy-dn ld -dn makes ld link against static libraries
ld-execstack ld -z execstack and NX bit
ld-export-dynamic ld --export-dynamic makes executables export dynamic symbols
ld-now ld -z now tells ld.so to resolve symbols immediately
ld-relro ld RELocation Read-Only
ld-rpath ld -rpath sets DT_RUNPATH which adds a directory to runtime library search path
ld-whole-archive ld --whole-archive includes every object files (not only those which are required)
ld-wrap ld --wrap makes undefined references to SYMBOL be resolved to __wrap_SYMBOL
LD_BIND_NOW ld.so resolve all symbols at startup instead of deferring resolution to the first call
LD_PROFILE ld.so profile a shared library
LD_TRACE_LOADED_OBJECTS ld.so list dynamic library dependencies rather than running
as-syscall as make syscalls in x86-64 assembly
as-syscall-i386 as make syscalls in i386 assembly
shellcode-in-c gcc,objcopy write shellcode in c using gcc & objcopy
objcopy-link-blob objcopy link blob into executable
libSegFault glibc
version-script-hiding-c++-dynsym ld hide C++ dynamic symbols using a version script

Dynamic linker

The man page ld.so(8) specifies directories are searched in which order when resolving library dependencies:

  • DT_RPATH attribute in dynamic section is DT_RUNPATH does not exist
  • environment variable LD_LIBRARY_PATH
  • DT_RUNPATH attribute in dynamic section
  • /etc/ld.so.cache
  • /lib, /usr/lib

More Repositories

1

ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
C++
3,719
star
2

LeetCode

Solutions of LeetCode Online Judge
C++
477
star
3

wechatircd

㊙用IRC客户端控制微信网页版
Python
407
star
4

Config

My config for gentoo linux, xmonad, vim, emacs, git, mutt, newsbeuter, tmux, pentadactyl, npm, idesk, xbindkeys, ...
Tcl
223
star
5

vscode-ccls

ccls plugin for Visual Studio Code
TypeScript
122
star
6

telegramircd

Control Telegram user account with IRC
Python
64
star
7

pcap-search

Python
51
star
8

HackerRank

My solutions to the challenges on HackerRank
C++
47
star
9

webqqircd

用IRC客户端控制WebQQ(SmartQQ),类似于wechatircd
JavaScript
40
star
10

CamlFeatherweight

Bytecode compiler of a variant of Caml
OCaml
30
star
11

picolld

A stripped-down LLD (LLVM linker)
C++
29
star
12

r2cLEMENCy

radare2 cLEMENCy plugins
C
23
star
13

OJHaskell

Some online judge solutions in Haskell
Haskell
16
star
14

Regex

A little regex engine
C
15
star
15

DEFCONCTFFinalsGameboxAdmin

gamebox admin scripts for DEF CON 22~23 CTF Finals
C
15
star
16

2016-09-24-cgc-defcon-ctf-presentation

My presentation on Cyber Grand Challenge and DEFCON 24 CTF at SHLUG monthly meeting
TeX
13
star
17

99-problems-ocaml

99 Lisp Problems in OCaml
OCaml
11
star
18

emacs-helm-kythe

Helm interface for Google Kythe
Emacs Lisp
7
star
19

DEFCON24CTFFinalsAdmin

admin scripts for DEF CON 24 CTF Finals
Python
7
star
20

userspace-exec

C
7
star
21

Snippets

C++
6
star
22

Hython

A little language with Python-like grammer
Haskell
5
star
23

RealWorldCTF-2018-ccls-fringe-and-rwext5

Real World CTF 2018 Quals ccls-fringe and Finals rwext5
Emacs Lisp
5
star
24

BCTF-2016-hsab-and-BetaFour

Two challenges hsab and BetaFour for BCTF 2016
C++
5
star
25

ArtificialIntelligence2013Spring

ArtificialIntelligence2013Spring
C++
4
star
26

dotemacs

MaskRay's customization for emacs
Emacs Lisp
4
star
27

99-problems-rust

Ninety-Nine Lisp Problems in Rust
Rust
4
star
28

position-heap

Implementation of position heaps
C++
4
star
29

ForceDirected

Collection of force-directed drawing algorithms
C++
4
star
30

ccls-static

3
star
31

raybot

An IRC bot in Perl
Perl
3
star
32

makefile-blog

Make your blog with Make
Emacs Lisp
3
star
33

po2db

Extract infomation from PO1, ... and insert into DB
Haskell
3
star
34

RFTP

FTP client and server
C++
3
star
35

byvblog

BYVblog is a pure HTML5 and client JavaScript Blog system.
JavaScript
3
star
36

99-problems-ruby

Ruby
2
star
37

WebAppScaffold

Grunt, Bower, npm; Sass, Slim, Coffee
CoffeeScript
2
star
38

YahooHackDay2013

Yahoo Hack Day 2013
C++
2
star
39

Database2014Spring

数据库专题训练
C++
2
star
40

EmailSystem

Presentation on email system
JavaScript
2
star
41

e-file

e-file is like apt-file in debian, it's used to search package name via filename for gentoo
2
star
42

llvm-phabricator-archive

CSS
2
star
43

maskray.tk

Haskell
1
star
44

DEFCON-21-CTF-Quals-OMGACM

C++
1
star
45

AI2013Dev

人工智能大作業Linux開發環境
C++
1
star
46

renrenfeed

RSS feed burner for www.renren.com
1
star
47

ComputerGraphics2013Spring

ComputerGraphics2013Spring
C++
1
star
48

wikileaks-email-search

HTML
1
star
49

mogral

Monitor, Graph and Alert
1
star
50

iwd

C
1
star
51

hsnippet

Code snippets in Haskell
Haskell
1
star
52

ell

C
1
star
53

tugitweb

TU Git Web
Python
1
star
54

SearchEngine2014Spring

搜索引擎技术基础
C++
1
star
55

kvm-unit-tests

https://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
C
1
star
56

lld-ideas

1
star