有没有涉及到 strace, pmap, nm, objdump 以及 objcopy 这些命令的Linux图书?

2012-11-29 11:27:25 +08:00
 platoo
这是一个教授布置的作业,要搞明白这些命令的使用和含义。看了一天文档,太抽象了搞不定啊。请问是否有专门介绍这些命令实现以及使用的书啊?跪谢!
4110 次点击
所在节点    Linux
8 条回复
SErHo
2012-11-29 11:32:32 +08:00
有一本书叫 Google!还有一本书叫 man!
platoo
2012-11-29 11:48:39 +08:00
@SErHo 谢谢,我的问题没有写清楚,抱歉。主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的。刚找到 linker and loaders,好像是一个门路的?
Js
2012-11-29 11:49:39 +08:00
<<binary hacks>>应该有,篇幅多不多就记不得了, 日本人写的, o'reilly出的, 国内翻译的名字很奇葩,叫<<黑客秘笈100选>>
binux
2012-11-29 11:59:37 +08:00
<程序员的自我修养>
likuku
2012-11-29 12:06:04 +08:00
「主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的」
去看源码可能是最佳方式,代码就是这些命令的设计理念和实现方式的最形象呈现。

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 <romanp@unshadow.net>
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
nodenode
2012-11-29 14:10:38 +08:00
同推荐 “程序员的自我修养”
jjgod
2012-11-30 05:24:33 +08:00
就看 Linkers and Loaders 吧。
hanf
2012-11-30 08:37:27 +08:00
《binary hacks》
没有更好的了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/53600

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX