1
SErHo 2012-11-29 11:32:32 +08:00
有一本书叫 Google!还有一本书叫 man!
|
2
platoo OP @SErHo 谢谢,我的问题没有写清楚,抱歉。主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的。刚找到 linker and loaders,好像是一个门路的?
|
3
Js 2012-11-29 11:49:39 +08:00
<<binary hacks>>应该有,篇幅多不多就记不得了, 日本人写的, o'reilly出的, 国内翻译的名字很奇葩,叫<<黑客秘笈100选>>
|
4
binux 2012-11-29 11:59:37 +08:00
<程序员的自我修养>
|
5
likuku 2012-11-29 12:06:04 +08:00 2
「主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的」
去看源码可能是最佳方式,代码就是这些命令的设计理念和实现方式的最形象呈现。 freebsd 下查到 % whereis strace strace: /usr/ports/devel/strace % cat /usr/ports/devel/strace/pkg-descr Strace is a process tracer, i.e. a debugging tool that prints out a trace of all the system calls made and signals received by a process itself or a process and its descendants. Strace is similar to the native BSD ``truss'' utility, but it's output style is more convenient in most cases. For strace to work, procfs has to be mounted. FreeBSD does not mount it by default. For more information, man procfs. WWW: http://sourceforge.net/projects/strace/ # 以上为strace官网,也能下载到源码包 % whereis pmap pmap: /usr/ports/sysutils/pmap cat /usr/ports/sysutils/pmap/pkg-descr % cat /usr/ports/sysutils/pmap/pkg-descr pmap is an utility for displaying the address space of a process. Author: Roman V. Palagin <[email protected]> WWW: ftp://ftp.wuppy.net.ru/pub/FreeBSD/local/pmap/ # 同上 ------ 以下的都属于freebsd的base system,所以自己下载freebsd官方源码包(ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/9.0-RELEASE/src.txz) tar和gunzip解压成 src 目录再去对应路径下去找就是了。 % whereis nm nm: /usr/bin/nm /usr/share/man/en.UTF-8/man1/nm.1.gz /usr/src/gnu/usr.bin/binutils/nm % whereis objdump objdump: /usr/bin/objdump /usr/share/man/en.UTF-8/man1/objdump.1.gz /usr/src/gnu/usr.bin/binutils/objdump % whereis objcopy objcopy: /usr/bin/objcopy /usr/share/man/en.UTF-8/man1/objcopy.1.gz /usr/src/gnu/usr.bin/binutils/objcopy |
6
nodenode 2012-11-29 14:10:38 +08:00
同推荐 “程序员的自我修养”
|
7
jjgod 2012-11-30 05:24:33 +08:00
就看 Linkers and Loaders 吧。
|
8
hanf 2012-11-30 08:37:27 +08:00
《binary hacks》
没有更好的了 |