一些偏的有用的命令

1.解析修饰过的名称

  binutils里面提供一个叫c++filt的工具,用来解析修饰过的名称

  比如:

2.在64位linux下面编译成32位可执行文件

  可能需要 

  sudo apt-get install libx32gcc-4.8-dev

  sudo apt-get install libc6-dev-i386

  或者

  sudo apt-get install g++-multilib

  linux 交叉编译

  http://blog.sina.com.cn/s/blog_7e2e98ad01015veb.html

  https://www.40huo.cn/blog/kali-64-32-compile/

3.gcc编译,汇编,链接

  

gcc test.c   //直接输出a.out可执行文件
gcc test.c -o test        //输出test可执行文件

//仅仅预编译
gcc -E test.c -o test.i        //仅仅预处理,预处理会丢弃注释,加上 -C,说明不丢弃
gcc -S test.i -o test.s        //编译
///或直接 gcc -S test.c -o test.s也可以得到test.s

as test.s -o test.o        //汇编
或gcc -c test.s -o test.o
或gcc -c test.c -o test.o

ld test.o        //链接,需要将所有的.o目标文件写出来
或直接用gcc

 

 

 

posted @ 2016-09-13 10:51  黑炭BC  阅读(160)  评论(0)    收藏  举报