C/C++编程可用的Linux自带工具

时间:2023-03-09 18:59:39
C/C++编程可用的Linux自带工具

GNU Binary Utilities或binutils是一整套的编程语言工具程序,用来处理许多格式的目标文件。当前的版本原本由在Cygnus Solutions的程序员以Binary File Descriptor library(libbfd)所撰写。这个工具程序通常搭配GCC、make、和GDB这些程序来使用。

相关网址:https://www.gnu.org/software/binutils/

addr2line - (可将一个地址转换成对应的源代码文件名和行号)Converts addresses into filenames and line numbers.

ar - (打包静态库工具,用法如:ar cru libx.a a.o b.o d.o)A utility for creating, modifying and extracting from archives.

c++filt - (解码C++名字工具,使用nm看到是编码后的名字)Filter to demangle encoded C++ symbols.

nm - (列出所有符号)Lists symbols from object files.

objdump - (显示目标文件的相关信息,亦可反汇编)Displays information from object files.

ranlib - (为静态库文件产生索引)Generates an index to the contents of an archive.

readelf - (显示ELF文件的内容)Displays information from any ELF format object file.

size - (列出文本段、数据段等大小)Lists the section sizes of an object or archive file.

strings - (列出任何二进制文件内的可显示字符串)Lists printable strings from files.

strip - (删除符号表工具,文件可以瘦身,但gdb将不能工作)Discards symbols.

gprof - (性能分析工具)Displays profiling information.

objcopy - (复制目标文件,过程中可以修改)Copies and translates object files.

dlltool - (创建Windows动态库工具)Creates files for building and using DLLs.

gold - (用来替代ld的链接工具,不过只能用于生成可执行程序,而不能用于生成共享库)A new, faster, ELF only linker, still in beta test.

nlmconv - (可以转换成NetWare Loadable Module目标文件格式)Converts object code into an NLM.

windmc - (产生Windows消息资源)A Windows compatible message compiler.

windres - (Windows资源文件编译器)A compiler for Windows resource files.

最新及各版本下载:http://ftp.gnu.org/gnu/binutils/