Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
platoo
V2EX  ›  Linux

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

  •  
  •   platoo · Nov 29, 2012 · 5832 views
    This topic created in 5090 days ago, the information mentioned may be changed or developed.
    这是一个教授布置的作业,要搞明白这些命令的使用和含义。看了一天文档,太抽象了搞不定啊。请问是否有专门介绍这些命令实现以及使用的书啊?跪谢!
    8 replies  •  1970-01-01 08:00:00 +08:00
    SErHo
    SErHo
    Nov 29, 2012
    1
    有一本书叫 Google!还有一本书叫 man!
    platoo
    platoo
    OP
    Nov 29, 2012
    2
    @SErHo 谢谢,我的问题没有写清楚,抱歉。主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的。刚找到 linker and loaders,好像是一个门路的?
    Js
    Js
    Nov 29, 2012
    3
    <<binary hacks>>应该有,篇幅多不多就记不得了, 日本人写的, o'reilly出的, 国内翻译的名字很奇葩,叫<<黑客秘笈100选>>
    binux
    binux
    Nov 29, 2012
    4
    <程序员的自我修养>
    likuku
    likuku
    Nov 29, 2012❤️2
    5
    「主要想了解命令的原理,以及打印信息的含义,感觉要搞清楚这些需要理解命令的实现什么的」
    去看源码可能是最佳方式,代码就是这些命令的设计理念和实现方式的最形象呈现。

    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
    nodenode
    nodenode
    Nov 29, 2012
    6
    同推荐 “程序员的自我修养”
    jjgod
    jjgod
    Nov 30, 2012
    7
    就看 Linkers and Loaders 吧。
    hanf
    hanf
    Nov 30, 2012
    8
    《binary hacks》
    没有更好的了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1035 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 19:02 · PVG 03:02 · LAX 11:02 · JFK 14:02
    ♥ Do have faith in what you're doing.