Skip to content

Commit

Permalink
2014年最后完善本书
Browse files Browse the repository at this point in the history
  • Loading branch information
me115 committed Dec 29, 2014
1 parent 1189559 commit c4ecd2d
Show file tree
Hide file tree
Showing 30 changed files with 990 additions and 1,077 deletions.
Binary file modified _build/doctrees/environment.pickle
Binary file not shown.
Binary file modified _build/doctrees/index.doctree
Binary file not shown.
37 changes: 17 additions & 20 deletions _build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,23 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="tool/index.html">工具参考篇</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tool/gdb.html">1. gdb 调试利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">4. nm 目标文件格式分析工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">5. ps命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">6. readelf 查看elf格式文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">7. scp命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. Linux命令工具 top详解</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat的语法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html#id1">10. 字段说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">11. wget命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">12. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">13. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id2">14. 命令功能</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id3">15. 命令参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id4">16. 文件格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id5">17. 常用方法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id10">18. 使用实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id26">19. 使用注意事项</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">20. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html#id2">21. 工具实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd 查看程序依赖库</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof 一切皆文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">4. ps 进程查看器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/pstack.html">5. pstack 跟踪进程栈</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/strace.html">6. strace 跟踪进程中的系统调用</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ipcs.html">7. ipcs 查询进程间通信状态</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. top linux下的任务管理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat 监视内存使用情况</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">10. iostat 监视I/O子系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">11. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">12. readelf elf文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/objdump.html">13. objdump 二进制文件分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">14. nm 目标文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/size.html">15. size 查看程序内存映像大小</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">16. wget 文件下载</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">17. scp 跨机远程拷贝</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">18. crontab 定时任务</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="helloworld.html">1&nbsp;&nbsp;&nbsp;reStructuredText简明教程</a><ul>
Expand Down
74 changes: 34 additions & 40 deletions _build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,23 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="tool/index.html">工具参考篇</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tool/gdb.html">1. gdb 调试利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">4. nm 目标文件格式分析工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">5. ps命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">6. readelf 查看elf格式文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">7. scp命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. Linux命令工具 top详解</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat的语法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html#id1">10. 字段说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">11. wget命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">12. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">13. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id2">14. 命令功能</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id3">15. 命令参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id4">16. 文件格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id5">17. 常用方法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id10">18. 使用实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id26">19. 使用注意事项</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">20. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html#id2">21. 工具实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd 查看程序依赖库</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof 一切皆文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">4. ps 进程查看器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/pstack.html">5. pstack 跟踪进程栈</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/strace.html">6. strace 跟踪进程中的系统调用</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ipcs.html">7. ipcs 查询进程间通信状态</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. top linux下的任务管理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat 监视内存使用情况</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">10. iostat 监视I/O子系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">11. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">12. readelf elf文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/objdump.html">13. objdump 二进制文件分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">14. nm 目标文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/size.html">15. size 查看程序内存映像大小</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">16. wget 文件下载</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">17. scp 跨机远程拷贝</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">18. crontab 定时任务</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="helloworld.html">1&nbsp;&nbsp;&nbsp;reStructuredText简明教程</a><ul>
Expand Down Expand Up @@ -180,26 +177,23 @@ <h2>目录<a class="headerlink" href="#id2" title="Permalink to this headline">
</li>
<li class="toctree-l1"><a class="reference internal" href="tool/index.html">工具参考篇</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tool/gdb.html">1. gdb 调试利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">4. nm 目标文件格式分析工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">5. ps命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">6. readelf 查看elf格式文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">7. scp命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. Linux命令工具 top详解</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat的语法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html#id1">10. 字段说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">11. wget命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">12. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">13. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id2">14. 命令功能</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id3">15. 命令参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id4">16. 文件格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id5">17. 常用方法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id10">18. 使用实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id26">19. 使用注意事项</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">20. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html#id2">21. 工具实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd 查看程序依赖库</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof 一切皆文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">4. ps 进程查看器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/pstack.html">5. pstack 跟踪进程栈</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/strace.html">6. strace 跟踪进程中的系统调用</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ipcs.html">7. ipcs 查询进程间通信状态</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. top linux下的任务管理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat 监视内存使用情况</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">10. iostat 监视I/O子系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">11. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">12. readelf elf文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/objdump.html">13. objdump 二进制文件分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">14. nm 目标文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/size.html">15. size 查看程序内存映像大小</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">16. wget 文件下载</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">17. scp 跨机远程拷贝</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">18. crontab 定时任务</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="helloworld.html">1&nbsp;&nbsp;&nbsp;reStructuredText简明教程</a><ul>
Expand Down
Binary file modified _build/html/objects.inv
Binary file not shown.
37 changes: 17 additions & 20 deletions _build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,23 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="tool/index.html">工具参考篇</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tool/gdb.html">1. gdb 调试利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">4. nm 目标文件格式分析工具</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">5. ps命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">6. readelf 查看elf格式文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">7. scp命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. Linux命令工具 top详解</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat的语法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html#id1">10. 字段说明</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">11. wget命令</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">12. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">13. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id2">14. 命令功能</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id3">15. 命令参数</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id4">16. 文件格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id5">17. 常用方法</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id10">18. 使用实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html#id26">19. 使用注意事项</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">20. 命令格式</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html#id2">21. 工具实例</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ldd.html">2. ldd 查看程序依赖库</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/lsof.html">3. lsof 一切皆文件</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ps.html">4. ps 进程查看器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/pstack.html">5. pstack 跟踪进程栈</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/strace.html">6. strace 跟踪进程中的系统调用</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/ipcs.html">7. ipcs 查询进程间通信状态</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/top.html">8. top linux下的任务管理器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/vmstat.html">9. vmstat 监视内存使用情况</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/iostat.html">10. iostat 监视I/O子系统</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/sar.html">11. sar 找出系统瓶颈的利器</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/readelf.html">12. readelf elf文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/objdump.html">13. objdump 二进制文件分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/nm.html">14. nm 目标文件格式分析</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/size.html">15. size 查看程序内存映像大小</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/wget.html">16. wget 文件下载</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/scp.html">17. scp 跨机远程拷贝</a></li>
<li class="toctree-l2"><a class="reference internal" href="tool/crontab.html">18. crontab 定时任务</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="helloworld.html">1&nbsp;&nbsp;&nbsp;reStructuredText简明教程</a><ul>
Expand Down
2 changes: 1 addition & 1 deletion _build/html/searchindex.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion advance/02_program_debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ nm用来列出目标文件的符号清单。
080483e4 T main
U printf@@GLIBC_2.0

这些包含可执行代码的段称为正文段。同样地,数据段包含了不可执行的信息或数据。另一种类型的段,称为 BSS 段,它包含以符号数据开头的块。对于 nm 命令列出的每个符号,它们的值使用十六进制来表示(缺省行为),并且在该符号前面加上了一个表示符号类型的编码字符。常见的各种编码包括:A 表示绝对 (absolute),这意味着不能将该值更改为其他的连接;B 表示 BSS 段中的符号;而 C 表示引用未初始化的数据的一般符号。
这些包含可执行代码的段称为正文段。同样地,数据段包含了不可执行的信息或数据。另一种类型的段,称为 BSS 段,它包含以符号数据开头的块。对于 nm 命令列出的每个符号,它们的值使用十六进制来表示(缺省行为),并且在该符号前面加上了一个表示符号类型的编码字符。

常见的各种编码包括:

- A 表示绝对 (absolute),这意味着不能将该值更改为其他的连接;
- B 表示 BSS 段中的符号;
- C 表示引用未初始化的数据的一般符号。

可以将目标文件中所包含的不同的部分划分为段。段可以包含可执行代码、符号名称、初始数据值和许多其他类型的数据。有关这些类型的数据的详细信息,可以阅读 UNIX 中 nm 的 man 页面,其中按照该命令输出中的字符编码分别对每种类型进行了描述。

在目标文件阶段,即使是一个简单的 Hello World 程序,其中也包含了大量的细节信息。nm 程序可用于列举符号及其类型和值,但是,要更仔细地研究目标文件中这些命名段的内容,需要使用功能更强大的工具。
Expand Down
Loading

0 comments on commit c4ecd2d

Please sign in to comment.