Skip to content

Instantly share code, notes, and snippets.

@mepcotterell
Last active February 28, 2019 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mepcotterell/1e46f6bc8534c4b40406bfb0c9df6a45 to your computer and use it in GitHub Desktop.
Save mepcotterell/1e46f6bc8534c4b40406bfb0c9df6a45 to your computer and use it in GitHub Desktop.
Library Disassembly Notes

Library Disassembly Notes

References

Examples

$ gcc -O0 -g -c main.c
$ gcc -o main main.o
$ ldd main
	linux-vdso.so.1 =>  (0x00007ffd25784000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003310400000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003310000000)
$ gdb -batch -ex 'file /lib64/libc.so.6' -ex 'disassemble printf'
#include <stdio.h>
int main() {
printf("hello world!\n");
return 0;
} // main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment