{"id":87138,"date":"2026-07-29T21:40:34","date_gmt":"2026-07-29T13:40:34","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87138.html"},"modified":"2026-07-29T21:40:34","modified_gmt":"2026-07-29T13:40:34","slug":"c-%e7%a8%8b%e5%ba%8f%e5%a6%82%e4%bd%95%e7%bc%96%e7%a8%8b%e5%8f%af%e6%89%a7%e8%a1%8c%e7%9a%84%e6%9c%ba%e5%99%a8%e7%a0%81%ef%bc%9a%e4%bb%8e%e6%ba%90%e4%bb%a3%e7%a0%81%e5%88%b0%e4%ba%8c%e8%bf%9b%e5%88%b6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87138.html","title":{"rendered":"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b"},"content":{"rendered":"<h3>1. \u5f15\u8a00&#xff1a;\u4ece C \u4ee3\u7801\u5230\u673a\u5668\u7801\u7684\u65c5\u7a0b<\/h3>\n<p>\u5f53\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684 C \u7a0b\u5e8f&#xff0c;\u6bd4\u5982\u7ecf\u5178\u7684 &#034;Hello, World!&#034;&#xff0c;\u7136\u540e\u901a\u8fc7\u7f16\u8bd1\u5668\u5c06\u5176\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u8fd9\u4e2a\u8fc7\u7a0b\u80cc\u540e\u9690\u85cf\u7740\u4e00\u7cfb\u5217\u590d\u6742\u7684\u8f6c\u6362\u6b65\u9aa4\u3002\u4ece\u4eba\u7c7b\u53ef\u8bfb\u7684 C \u6e90\u4ee3\u7801\u5230\u8ba1\u7b97\u673a\u80fd\u591f\u76f4\u63a5\u6267\u884c\u7684\u673a\u5668\u7801&#xff0c;\u9700\u8981\u7ecf\u8fc7\u9884\u5904\u7406\u3001\u7f16\u8bd1\u3001\u6c47\u7f16\u548c\u94fe\u63a5\u56db\u4e2a\u4e3b\u8981\u9636\u6bb5\u3002\u7406\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\u4e0d\u4ec5\u6709\u52a9\u4e8e\u6211\u4eec\u7f16\u5199\u66f4\u9ad8\u6548\u7684\u4ee3\u7801&#xff0c;\u8fd8\u80fd\u5728\u7a0b\u5e8f\u51fa\u73b0\u95ee\u9898\u65f6\u8fdb\u884c\u66f4\u7cbe\u51c6\u7684\u8c03\u8bd5\u3002<\/p>\n<p>\u4e3a\u4e86\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u4eceC\u6e90\u4ee3\u7801\u5230\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b8c\u6574\u8f6c\u6362\u8fc7\u7a0b&#xff0c;\u4e0b\u9762\u901a\u8fc7\u6d41\u7a0b\u56fe\u5c55\u793a\u56db\u4e2a\u7f16\u8bd1\u9636\u6bb5\u53ca\u5176\u8f93\u5165\u8f93\u51fa\u6587\u4ef6&#xff1a;<\/p>\n<p>flowchart TD<br \/>\n    A[C\u6e90\u4ee3\u7801\u6587\u4ef6<br \/>\n.c] &#8211;&gt; B[\u9884\u5904\u7406<br \/>\nPreprocessing]<br \/>\n    B &#8211;&gt; C[\u9884\u5904\u7406\u540e\u6587\u4ef6<br \/>\n.i]<br \/>\n    C &#8211;&gt; D[\u7f16\u8bd1<br \/>\nCompilation]<br \/>\n    D &#8211;&gt; E[\u6c47\u7f16\u4ee3\u7801\u6587\u4ef6<br \/>\n.s]<br \/>\n    E &#8211;&gt; F[\u6c47\u7f16<br \/>\nAssembly]<br \/>\n    F &#8211;&gt; G[\u76ee\u6807\u6587\u4ef6<br \/>\n.o\/.obj]<br \/>\n    G &#8211;&gt; H[\u94fe\u63a5<br \/>\nLinking]<br \/>\n    H &#8211;&gt; I[\u53ef\u6267\u884c\u6587\u4ef6<br \/>\n\u65e0\u6269\u5c55\u540d\/.exe]<br \/>\nstyle A fill:#e1f5fe<br \/>\nstyle C fill:#f3e5f5<br \/>\nstyle E fill:#e8f5e8<br \/>\nstyle G fill:#fff3e0<br \/>\nstyle I fill:#ffebee<br \/>\nB &#8211;&amp;gt;|\u5c55\u5f00\u5934\u6587\u4ef6<br \/>\n\u5904\u7406\u5b8f\u5b9a\u4e49| C<br \/>\nD &#8211;&gt;|\u8bed\u6cd5\u5206\u6790<br \/>\n\u8bed\u4e49\u5206\u6790| E<br \/>\nF &#8211;&gt;|\u6307\u4ee4\u7ffb\u8bd1<br \/>\n\u751f\u6210\u673a\u5668\u7801| G<br \/>\nH &#8211;&gt;|\u7b26\u53f7\u89e3\u6790<br \/>\n\u91cd\u5b9a\u4f4d| I<\/p>\n<p>\u6d41\u7a0b\u56fe\u6e05\u6670\u5730\u5c55\u793a\u4e86\u4ece.c\u6e90\u6587\u4ef6\u5f00\u59cb&#xff0c;\u7ecf\u8fc7\u9884\u5904\u7406\u751f\u6210.i\u6587\u4ef6&#xff0c;\u7f16\u8bd1\u751f\u6210.s\u6c47\u7f16\u6587\u4ef6&#xff0c;\u6c47\u7f16\u751f\u6210.o\u76ee\u6807\u6587\u4ef6&#xff0c;\u6700\u540e\u94fe\u63a5\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b8c\u6574\u6d41\u7a0b\u3002\u6bcf\u4e2a\u9636\u6bb5\u90fd\u6709\u7279\u5b9a\u7684\u8f93\u5165\u548c\u8f93\u51fa\u6587\u4ef6\u683c\u5f0f&#xff0c;\u7406\u89e3\u8fd9\u4e9b\u4e2d\u95f4\u6587\u4ef6\u6709\u52a9\u4e8e\u6df1\u5165\u8c03\u8bd5\u548c\u4f18\u5316\u7f16\u8bd1\u8fc7\u7a0b\u3002<\/p>\n<h3>2. \u673a\u5668\u7801\u7684\u672c\u8d28<\/h3>\n<p>\u673a\u5668\u7801\u662f\u8ba1\u7b97\u673a CPU \u80fd\u591f\u76f4\u63a5\u7406\u89e3\u548c\u6267\u884c\u7684\u4e8c\u8fdb\u5236\u6307\u4ee4\u5e8f\u5217\u3002\u6bcf\u4e2a CPU \u67b6\u6784&#xff08;\u5982 x86\u3001ARM\u3001MIPS&#xff09;\u90fd\u6709\u81ea\u5df1\u72ec\u7279\u7684\u6307\u4ee4\u96c6\u67b6\u6784&#xff08;ISA&#xff09;&#xff0c;\u8fd9\u4e9b\u6307\u4ee4\u96c6\u5b9a\u4e49\u4e86 CPU \u80fd\u591f\u6267\u884c\u7684\u64cd\u4f5c\u4ee5\u53ca\u5bf9\u5e94\u7684\u4e8c\u8fdb\u5236\u7f16\u7801\u3002<\/p>\n<p>\u673a\u5668\u7801\u7684\u7279\u70b9&#xff1a;<\/p>\n<ul>\n<li>\u4e8c\u8fdb\u5236\u683c\u5f0f&#xff1a;\u7531 0 \u548c 1 \u7ec4\u6210\u7684\u5e8f\u5217<\/li>\n<li>\u5e73\u53f0\u76f8\u5173&#xff1a;\u4e0d\u540c CPU \u67b6\u6784\u7684\u673a\u5668\u7801\u4e0d\u517c\u5bb9<\/li>\n<li>\u76f4\u63a5\u6267\u884c&#xff1a;CPU \u53ef\u4ee5\u76f4\u63a5\u8bfb\u53d6\u548c\u6267\u884c&#xff0c;\u65e0\u9700\u7ffb\u8bd1<\/li>\n<li>\u4f4e\u7ea7\u8bed\u8a00&#xff1a;\u4e0e\u786c\u4ef6\u64cd\u4f5c\u76f4\u63a5\u5bf9\u5e94<\/li>\n<\/ul>\n<h3>3. C \u7a0b\u5e8f\u7f16\u8bd1\u7684\u56db\u4e2a\u9636\u6bb5<\/h3>\n<h4>3.1 \u9884\u5904\u7406&#xff08;Preprocessing&#xff09;<\/h4>\n<p>\u9884\u5904\u7406\u662f\u7f16\u8bd1\u8fc7\u7a0b\u7684\u7b2c\u4e00\u6b65&#xff0c;\u4e3b\u8981\u5904\u7406\u6e90\u4ee3\u7801\u4e2d\u7684\u9884\u5904\u7406\u6307\u4ee4&#xff1a;<\/p>\n<p>#include &lt;stdio.h&gt;<br \/>\n#define MAX_SIZE 100<br \/>\nint main() {<br \/>\nprintf(&#034;Hello, World!\\\\n&#034;);<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u9884\u5904\u7406\u9636\u6bb5\u4f1a&#xff1a;<\/p>\n<ul>\n<li>\u5c55\u5f00\u5934\u6587\u4ef6&#xff08;\u5c06 #include \u7684\u5185\u5bb9\u63d2\u5165\u5230\u6e90\u6587\u4ef6\u4e2d&#xff09;<\/li>\n<li>\u5904\u7406\u5b8f\u5b9a\u4e49&#xff08;\u5c06 #define \u7684\u6807\u8bc6\u7b26\u66ff\u6362\u4e3a\u5bf9\u5e94\u7684\u503c&#xff09;<\/li>\n<li>\u6761\u4ef6\u7f16\u8bd1&#xff08;\u5904\u7406 #ifdef\u3001#ifndef\u3001#endif \u7b49&#xff09;<\/li>\n<li>\u5220\u9664\u6ce8\u91ca<\/li>\n<\/ul>\n<h4>3.2 \u7f16\u8bd1&#xff08;Compilation&#xff09;<\/h4>\n<p>\u7f16\u8bd1\u9636\u6bb5\u5c06\u9884\u5904\u7406\u540e\u7684 C \u4ee3\u7801\u8f6c\u6362\u4e3a\u6c47\u7f16\u4ee3\u7801\u3002\u8fd9\u662f\u4ece\u9ad8\u7ea7\u8bed\u8a00\u5230\u4f4e\u7ea7\u8bed\u8a00\u7684\u5173\u952e\u8f6c\u6362&#xff1a;<\/p>\n<p>\/\/ C \u6e90\u4ee3\u7801<br \/>\nint add(int a, int b) {<br \/>\n    return a &#043; b;<br \/>\n}<\/p>\n<p>\u53ef\u80fd\u8f6c\u6362\u4e3a x86 \u6c47\u7f16\u4ee3\u7801&#xff1a;<\/p>\n<p>add:<br \/>\n    push    rbp<br \/>\n    mov     rbp, rsp<br \/>\n    mov     DWORD PTR [rbp-4], edi<br \/>\n    mov     DWORD PTR [rbp-8], esi<br \/>\n    mov     edx, DWORD PTR [rbp-4]<br \/>\n    mov     eax, DWORD PTR [rbp-8]<br \/>\n    add     eax, edx<br \/>\n    pop     rbp<br \/>\n    ret<\/p>\n<h4>3.3 \u6c47\u7f16&#xff08;Assembly&#xff09;<\/h4>\n<p>\u6c47\u7f16\u9636\u6bb5\u5c06\u6c47\u7f16\u4ee3\u7801\u8f6c\u6362\u4e3a\u673a\u5668\u7801&#xff08;\u76ee\u6807\u6587\u4ef6&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\u6c47\u7f16\u5668\u5c06\u6c47\u7f16\u6307\u4ee4\u9010\u6761\u7ffb\u8bd1\u4e3a\u5bf9\u5e94\u7684\u673a\u5668\u7801<\/li>\n<li>\u751f\u6210\u76ee\u6807\u6587\u4ef6&#xff08;.o \u6216 .obj \u6587\u4ef6&#xff09;<\/li>\n<li>\u76ee\u6807\u6587\u4ef6\u5305\u542b\u673a\u5668\u7801\u3001\u6570\u636e\u548c\u7b26\u53f7\u8868\u7b49\u4fe1\u606f<\/li>\n<li>\u4f46\u6b64\u65f6\u8fd8\u4e0d\u80fd\u76f4\u63a5\u6267\u884c&#xff0c;\u56e0\u4e3a\u53ef\u80fd\u5f15\u7528\u5916\u90e8\u51fd\u6570<\/li>\n<\/ul>\n<h4>3.4 \u94fe\u63a5&#xff08;Linking&#xff09;<\/h4>\n<p>\u94fe\u63a5\u9636\u6bb5\u5c06\u591a\u4e2a\u76ee\u6807\u6587\u4ef6\u548c\u5e93\u6587\u4ef6\u5408\u5e76\u4e3a\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6&#xff1a;<\/p>\n<ul>\n<li>\u7b26\u53f7\u89e3\u6790&#xff1a;\u786e\u5b9a\u6bcf\u4e2a\u7b26\u53f7&#xff08;\u51fd\u6570\u540d\u3001\u53d8\u91cf\u540d&#xff09;\u7684\u5730\u5740<\/li>\n<li>\u91cd\u5b9a\u4f4d&#xff1a;\u8c03\u6574\u4ee3\u7801\u4e2d\u7684\u5730\u5740\u5f15\u7528<\/li>\n<li>\u5e93\u94fe\u63a5&#xff1a;\u94fe\u63a5\u6807\u51c6\u5e93\u548c\u5176\u4ed6\u5e93\u6587\u4ef6<\/li>\n<li>\u751f\u6210\u6700\u7ec8\u7684\u53ef\u6267\u884c\u6587\u4ef6&#xff08;\u5982 Windows \u7684 .exe&#xff0c;Linux \u7684 ELF \u6587\u4ef6&#xff09;<\/li>\n<\/ul>\n<h3>4. \u5b9e\u9645\u793a\u4f8b&#xff1a;\u4ece C \u4ee3\u7801\u5230\u53ef\u6267\u884c\u6587\u4ef6<\/h3>\n<h4>4.1 \u7f16\u5199 C \u6e90\u4ee3\u7801<\/h4>\n<p>\/\/ hello.c<br \/>\n#include &lt;stdio.h&gt;<br \/>\nint main() {<br \/>\nprintf(&#034;Hello, Machine Code!\\\\n&#034;);<br \/>\nreturn 0;<br \/>\n}<\/p>\n<h4>4.2 \u4f7f\u7528 GCC \u7f16\u8bd1&#xff08;Linux\/macOS&#xff09;<\/h4>\n<p>\u67e5\u770b\u5b8c\u6574\u7684\u7f16\u8bd1\u8fc7\u7a0b&#xff1a;<\/p>\n<p># 1. \u9884\u5904\u7406&#xff1a;\u751f\u6210\u9884\u5904\u7406\u540e\u7684\u6587\u4ef6<br \/>\ngcc -E hello.c -o hello.i<br \/>\n2. \u7f16\u8bd1&#xff1a;\u751f\u6210\u6c47\u7f16\u6587\u4ef6<br \/>\ngcc -S hello.i -o hello.s<br \/>\n3. \u6c47\u7f16&#xff1a;\u751f\u6210\u76ee\u6807\u6587\u4ef6<br \/>\ngcc -c hello.s -o hello.o<br \/>\n4. \u94fe\u63a5&#xff1a;\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6<br \/>\ngcc hello.o -o hello<br \/>\n\u6216\u8005\u4e00\u6b65\u5b8c\u6210\u6240\u6709\u9636\u6bb5<br \/>\ngcc hello.c -o hello<\/p>\n<h4>4.3 \u67e5\u770b\u673a\u5668\u7801<\/h4>\n<p>\u4f7f\u7528 objdump \u67e5\u770b\u53ef\u6267\u884c\u6587\u4ef6\u4e2d\u7684\u673a\u5668\u7801&#xff1a;<\/p>\n<p># \u67e5\u770b\u53cd\u6c47\u7f16\u4ee3\u7801&#xff08;\u673a\u5668\u7801 &#043; \u6c47\u7f16&#xff09;<br \/>\nobjdump -d hello<br \/>\n\u53ea\u67e5\u770b\u673a\u5668\u7801&#xff08;\u5341\u516d\u8fdb\u5236&#xff09;<br \/>\nobjdump -s -j .text hello<\/p>\n<p>\u8f93\u51fa\u793a\u4f8b&#xff1a;<\/p>\n<p>0000000000401136 &lt;main&gt;:<br \/>\n  401136:       55                      push   %rbp<br \/>\n  401137:       48 89 e5                mov    %rsp,%rbp<br \/>\n  40113a:       48 83 ec 10             sub    $0x10,%rsp<br \/>\n  40113e:       c7 45 fc 00 00 00 00    movl   $0x0,-0x4(%rbp)<br \/>\n  401145:       48 8d 3d b8 0e 00 00    lea    0xeb8(%rip),%rdi<br \/>\n  40114c:       b0 00                   mov    $0x0,%al<br \/>\n  40114e:       e8 dd fe ff ff          callq  401030 &lt;printf&#064;plt&gt;<br \/>\n  401153:       31 c9                   xor    %ecx,%ecx<br \/>\n  401155:       89 45 f8                mov    %eax,-0x8(%rbp)<br \/>\n  401158:       89 c8                   mov    %ecx,%eax<br \/>\n  40115a:       48 83 c4 10             add    $0x10,%rsp<br \/>\n  40115e:       5d                      pop    %rbp<br \/>\n  40115f:       c3                      ret<\/p>\n<h3>5. \u673a\u5668\u7801\u7684\u7ec4\u6210\u7ed3\u6784<\/h3>\n<h4>5.1 \u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f<\/h4>\n<p>\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4f7f\u7528\u4e0d\u540c\u7684\u53ef\u6267\u884c\u6587\u4ef6\u683c\u5f0f&#xff1a;<\/p>\n<table>\n<tr>\u64cd\u4f5c\u7cfb\u7edf\u6587\u4ef6\u683c\u5f0f\u7279\u70b9<\/tr>\n<tbody>\n<tr>\n<td>Windows<\/td>\n<td>PE&#xff08;Portable Executable&#xff09;<\/td>\n<td>.exe, .dll \u6587\u4ef6<\/td>\n<\/tr>\n<tr>\n<td>Linux\/Unix<\/td>\n<td>ELF&#xff08;Executable and Linkable Format&#xff09;<\/td>\n<td>\u65e0\u6269\u5c55\u540d\u6216\u81ea\u5b9a\u4e49<\/td>\n<\/tr>\n<tr>\n<td>macOS<\/td>\n<td>Mach-O<\/td>\n<td>\u82f9\u679c\u7cfb\u7edf\u4e13\u7528\u683c\u5f0f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>5.2 ELF \u6587\u4ef6\u7ed3\u6784&#xff08;Linux&#xff09;<\/h4>\n<p>ELF \u6587\u4ef6\u5305\u542b\u4ee5\u4e0b\u4e3b\u8981\u90e8\u5206&#xff1a;<\/p>\n<ul>\n<li>ELF \u5934&#xff1a;\u6807\u8bc6\u6587\u4ef6\u7c7b\u578b\u3001\u76ee\u6807\u67b6\u6784\u7b49<\/li>\n<li>\u7a0b\u5e8f\u5934\u8868&#xff1a;\u63cf\u8ff0\u6bb5&#xff08;Segment&#xff09;\u4fe1\u606f&#xff0c;\u7528\u4e8e\u52a0\u8f7d<\/li>\n<li>\u8282\u5934\u8868&#xff1a;\u63cf\u8ff0\u8282&#xff08;Section&#xff09;\u4fe1\u606f&#xff0c;\u7528\u4e8e\u94fe\u63a5<\/li>\n<li>.text \u8282&#xff1a;\u5b58\u653e\u673a\u5668\u7801&#xff08;\u4ee3\u7801&#xff09;<\/li>\n<li>.data \u8282&#xff1a;\u5b58\u653e\u5df2\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf<\/li>\n<li>.bss \u8282&#xff1a;\u5b58\u653e\u672a\u521d\u59cb\u5316\u7684\u5168\u5c40\u53d8\u91cf<\/li>\n<li>.rodata \u8282&#xff1a;\u5b58\u653e\u53ea\u8bfb\u6570\u636e&#xff08;\u5982\u5b57\u7b26\u4e32\u5e38\u91cf&#xff09;<\/li>\n<\/ul>\n<h3>6. \u4f18\u5316\u6280\u5de7&#xff1a;\u751f\u6210\u66f4\u9ad8\u6548\u7684\u673a\u5668\u7801<\/h3>\n<h4>6.1 \u7f16\u8bd1\u5668\u4f18\u5316\u9009\u9879<\/h4>\n<p># O0&#xff1a;\u4e0d\u4f18\u5316&#xff08;\u9ed8\u8ba4&#xff0c;\u4fbf\u4e8e\u8c03\u8bd5&#xff09;<br \/>\ngcc -O0 hello.c -o hello<br \/>\nO1&#xff1a;\u57fa\u672c\u4f18\u5316<br \/>\ngcc -O1 hello.c -o hello<br \/>\nO2&#xff1a;\u66f4\u591a\u4f18\u5316&#xff08;\u63a8\u8350&#xff09;<br \/>\ngcc -O2 hello.c -o hello<br \/>\nO3&#xff1a;\u6fc0\u8fdb\u4f18\u5316<br \/>\ngcc -O3 hello.c -o hello<br \/>\nOs&#xff1a;\u4f18\u5316\u4ee3\u7801\u5927\u5c0f<br \/>\ngcc -Os hello.c -o hello<\/p>\n<h4>6.2 \u67e5\u770b\u4f18\u5316\u6548\u679c<\/h4>\n<p># \u751f\u6210\u6c47\u7f16\u4ee3\u7801\u5e76\u67e5\u770b\u4f18\u5316\u6548\u679c<br \/>\ngcc -S -O0 hello.c -o hello_O0.s<br \/>\ngcc -S -O2 hello.c -o hello_O2.s<br \/>\n\u6bd4\u8f83\u4e24\u4e2a\u7248\u672c\u7684\u6c47\u7f16\u4ee3\u7801<br \/>\ndiff hello_O0.s hello_O2.s<\/p>\n<h3>7. \u8c03\u8bd5\u4e0e\u53cd\u6c47\u7f16\u5de5\u5177<\/h3>\n<h4>7.1 \u5e38\u7528\u5de5\u5177<\/h4>\n<ul>\n<li>objdump&#xff1a;\u53cd\u6c47\u7f16\u5de5\u5177&#xff0c;\u67e5\u770b\u673a\u5668\u7801\u548c\u6c47\u7f16\u4ee3\u7801<\/li>\n<li>readelf&#xff1a;\u67e5\u770b ELF \u6587\u4ef6\u7ed3\u6784<\/li>\n<li>nm&#xff1a;\u67e5\u770b\u7b26\u53f7\u8868<\/li>\n<li>gdb&#xff1a;\u8c03\u8bd5\u5668&#xff0c;\u53ef\u5355\u6b65\u6267\u884c\u673a\u5668\u6307\u4ee4<\/li>\n<li>hexdump&#xff1a;\u4ee5\u5341\u516d\u8fdb\u5236\u67e5\u770b\u6587\u4ef6\u5185\u5bb9<\/li>\n<li>IDA Pro&#xff1a;\u4ea4\u4e92\u5f0f\u53cd\u6c47\u7f16\u5668\u548c\u8c03\u8bd5\u5668&#xff0c;\u652f\u6301\u591a\u79cd\u5904\u7406\u5668\u67b6\u6784\u548c\u6587\u4ef6\u683c\u5f0f&#xff0c;\u63d0\u4f9b\u56fe\u5f62\u5316\u5206\u6790\u754c\u9762&#xff0c;\u80fd\u591f\u8bc6\u522b\u51fd\u6570\u3001\u6570\u636e\u7ed3\u6784&#xff0c;\u5e76\u652f\u6301\u811a\u672c\u81ea\u52a8\u5316\u5206\u6790<\/li>\n<li>ISS&#xff08;Instruction Set Simulator&#xff09;&#xff1a;\u6307\u4ee4\u96c6\u6a21\u62df\u5668&#xff0c;\u7528\u4e8e\u5728\u4e0d\u652f\u6301\u7279\u5b9a\u6307\u4ee4\u96c6\u7684\u786c\u4ef6\u4e0a\u6a21\u62df\u6267\u884c\u673a\u5668\u7801&#xff0c;\u5e2e\u52a9\u7406\u89e3\u65b0\u6307\u4ee4\u96c6\u7279\u6027\u3001\u8fdb\u884c\u517c\u5bb9\u6027\u6d4b\u8bd5\u548c\u6027\u80fd\u5206\u6790<\/li>\n<\/ul>\n<h4>7.2 \u5b9e\u9645\u8c03\u8bd5\u793a\u4f8b<\/h4>\n<p># \u4f7f\u7528 gdb \u8c03\u8bd5&#xff0c;\u67e5\u770b\u673a\u5668\u7801\u6267\u884c<br \/>\ngdb .\/hello<br \/>\n\u5728 gdb \u4e2d<br \/>\n(gdb) break main          # \u5728 main \u51fd\u6570\u8bbe\u7f6e\u65ad\u70b9<br \/>\n(gdb) run                # \u8fd0\u884c\u7a0b\u5e8f<br \/>\n(gdb) disassemble        # \u53cd\u6c47\u7f16\u5f53\u524d\u51fd\u6570<br \/>\n(gdb) stepi              # \u5355\u6b65\u6267\u884c\u4e00\u6761\u673a\u5668\u6307\u4ee4<br \/>\n(gdb) info registers     # \u67e5\u770b\u5bc4\u5b58\u5668\u72b6\u6001<\/p>\n<h5>\u5b9e\u6218&#xff1a;\u624b\u52a8\u89e3\u6790\u673a\u5668\u7801<\/h5>\n<p>\u7406\u89e3\u673a\u5668\u7801\u4e0e\u6c47\u7f16\u6307\u4ee4\u7684\u5bf9\u5e94\u5173\u7cfb\u6709\u52a9\u4e8e\u6df1\u5165\u8c03\u8bd5\u3002\u4e0b\u9762\u4ee5 x86_64 \u67b6\u6784\u4e3a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u624b\u52a8\u89e3\u6790\u4e00\u6761\u7b80\u5355\u7684\u673a\u5668\u6307\u4ee4\u3002<\/p>\n<p>\u5728\u4e4b\u524d\u7684 objdump \u8f93\u51fa\u4e2d&#xff0c;\u6211\u4eec\u770b\u5230 main \u51fd\u6570\u7684\u7b2c\u4e00\u6761\u6307\u4ee4&#xff1a;<\/p>\n<p>401136:       55                      push   %rbp<\/p>\n<p>\u5176\u4e2d 55 \u662f\u5341\u516d\u8fdb\u5236\u673a\u5668\u7801&#xff0c;\u5bf9\u5e94\u6c47\u7f16\u6307\u4ee4 push %rbp\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u7406\u89e3\u8fd9\u4e2a\u5bf9\u5e94\u5173\u7cfb&#xff1a;<\/p>\n<h6 style=\"background-color:transparent\">1. \u67e5\u9605 Intel \u6307\u4ee4\u96c6\u624b\u518c<\/h6>\n<p>Intel \u5b98\u65b9\u624b\u518c&#xff08;Intel\u00ae 64 and IA-32 Architectures Software Developer&#039;s Manual&#xff09;\u662f\u6743\u5a01\u53c2\u8003\u8d44\u6599&#xff1a;<\/p>\n<ul>\n<li>Volume 2: Instruction Set Reference \u5305\u542b\u6240\u6709\u6307\u4ee4\u7684\u7f16\u7801\u683c\u5f0f<\/li>\n<li>PUSH \u6307\u4ee4&#xff1a;\u64cd\u4f5c\u7801&#xff08;opcode&#xff09;\u4e3a 50&#043;rw \u6216 FF \/6 \u7b49\u5f62\u5f0f<\/li>\n<li>\u5bf9\u4e8e\u5bc4\u5b58\u5668\u538b\u6808&#xff0c;55 \u5bf9\u5e94 PUSH rBP&#xff08;\u5bc4\u5b58\u5668 RBP \u7684\u7f16\u7801&#xff09;<\/li>\n<\/ul>\n<h6>2. \u4f7f\u7528\u5728\u7ebf\u53cd\u6c47\u7f16\u5de5\u5177<\/h6>\n<p>\u5bf9\u4e8e\u5feb\u901f\u9a8c\u8bc1&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5728\u7ebf\u5de5\u5177&#xff1a;<\/p>\n<ul>\n<li>Defuse.ca Online x86\/x64 Assembler and Disassembler<\/li>\n<li>Godbolt Compiler Explorer&#xff08;\u67e5\u770b\u7f16\u8bd1\u5668\u751f\u6210\u7684\u6c47\u7f16\u548c\u673a\u5668\u7801&#xff09;<\/li>\n<li>Online Disassembler&#xff08;\u5982 https:\/\/onlinedisassembler.com&#xff09;<\/li>\n<\/ul>\n<p>\u793a\u4f8b&#xff1a;\u5728 Defuse.ca \u5de5\u5177\u4e2d\u8f93\u5165 55&#xff08;\u5341\u516d\u8fdb\u5236&#xff09;&#xff0c;\u9009\u62e9 x86-64 \u67b6\u6784&#xff0c;\u4f1a\u5f97\u5230&#xff1a;<\/p>\n<p>Disassembly:<br \/>\n0:  55                      push   rbp<\/p>\n<h6>3. \u7406\u89e3\u6307\u4ee4\u7f16\u7801\u7ed3\u6784<\/h6>\n<p>x86-64 \u6307\u4ee4\u901a\u5e38\u5305\u542b&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7801&#xff08;Opcode&#xff09;&#xff1a;55 \u8868\u793a &#034;PUSH rBP&#034;<\/li>\n<li>ModR\/M \u5b57\u8282&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u6307\u5b9a\u5bfb\u5740\u6a21\u5f0f<\/li>\n<li>SIB \u5b57\u8282&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u6bd4\u4f8b-\u7d22\u5f15-\u57fa\u5740\u5bfb\u5740<\/li>\n<li>\u4f4d\u79fb&#xff08;Displacement&#xff09;&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u5730\u5740\u504f\u79fb\u91cf<\/li>\n<li>\u7acb\u5373\u6570&#xff08;Immediate&#xff09;&#xff08;\u53ef\u9009&#xff09;&#xff1a;\u76f4\u63a5\u64cd\u4f5c\u6570<\/li>\n<\/ul>\n<p>\u5bf9\u4e8e\u7b80\u5355\u7684 push %rbp&#xff1a;<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7801 55 \u76f4\u63a5\u7f16\u7801\u4e86\u64cd\u4f5c&#xff08;PUSH&#xff09;\u548c\u5bc4\u5b58\u5668&#xff08;RBP&#xff09;<\/li>\n<li>\u4e0d\u9700\u8981\u989d\u5916\u7684 ModR\/M \u5b57\u8282<\/li>\n<li>\u6307\u4ee4\u957f\u5ea6\u4e3a 1 \u5b57\u8282<\/li>\n<\/ul>\n<h6>4. \u5b9e\u9645\u89e3\u6790\u7ec3\u4e60<\/h6>\n<p>\u5c1d\u8bd5\u89e3\u6790\u4e0b\u4e00\u6761\u6307\u4ee4 48 89 e5&#xff08;\u5bf9\u5e94 mov %rsp,%rbp&#xff09;&#xff1a;<\/p>\n<p>48 89 e5 \u5206\u89e3&#xff1a;<br \/>\n&#8211; 48&#xff1a;REX.W \u524d\u7f00&#xff08;64\u4f4d\u64cd\u4f5c\u6570\u5927\u5c0f&#xff09;<br \/>\n&#8211; 89&#xff1a;MOV r\/m64, r64 \u7684\u64cd\u4f5c\u7801<br \/>\n&#8211; e5&#xff1a;ModR\/M \u5b57\u8282 &#061; 11 100 101<br \/>\n  &#8211; Mod&#061;11&#xff08;\u5bc4\u5b58\u5668\u5bfb\u5740&#xff09;<br \/>\n  &#8211; Reg&#061;100&#xff08;\u6e90\u5bc4\u5b58\u5668 &#061; RSP&#xff09;<br \/>\n  &#8211; R\/M&#061;101&#xff08;\u76ee\u7684\u5bc4\u5b58\u5668 &#061; RBP&#xff09;<\/p>\n<p>\u901a\u8fc7\u8fd9\u6837\u7684\u624b\u52a8\u89e3\u6790&#xff0c;\u53ef\u4ee5&#xff1a;<\/p>\n<li>\u6df1\u5165\u7406\u89e3 CPU \u5982\u4f55\u89e3\u7801\u548c\u6267\u884c\u6307\u4ee4<\/li>\n<li>\u8c03\u8bd5\u65f6\u80fd\u76f4\u63a5\u9605\u8bfb\u673a\u5668\u7801&#xff0c;\u4e0d\u4f9d\u8d56\u53cd\u6c47\u7f16\u5de5\u5177<\/li>\n<li>\u7406\u89e3\u7f16\u8bd1\u5668\u4f18\u5316\u5bf9\u6307\u4ee4\u7f16\u7801\u7684\u5f71\u54cd<\/li>\n<li>\u4e3a\u5b66\u4e60\u6c47\u7f16\u8bed\u8a00\u548c\u7cfb\u7edf\u7f16\u7a0b\u6253\u4e0b\u575a\u5b9e\u57fa\u7840<\/li>\n<p>\u5efa\u8bae\u8bfb\u8005\u4f7f\u7528 gdb \u7684 x\/i \u547d\u4ee4\u67e5\u770b\u5185\u5b58\u4e2d\u7684\u673a\u5668\u7801&#xff0c;\u6216\u7f16\u5199\u5c0f\u7a0b\u5e8f\u8f93\u51fa\u81ea\u5df1\u51fd\u6570\u7684\u673a\u5668\u7801&#xff0c;\u7136\u540e\u5bf9\u7167 Intel \u624b\u518c\u8fdb\u884c\u89e3\u6790\u7ec3\u4e60\u3002<\/p>\n<\/p>\n<h5>\u5b9e\u6218&#xff1a;\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u53cd\u6c47\u7f16\u5668<\/h5>\n<\/p>\n<p>\u7406\u89e3\u4e86\u673a\u5668\u7801\u4e0e\u6c47\u7f16\u6307\u4ee4\u7684\u5bf9\u5e94\u5173\u7cfb\u540e&#xff0c;\u6211\u4eec\u53ef\u4ee5\u5c1d\u8bd5\u7f16\u5199\u4e00\u4e2a\u7b80\u6613\u7684\u53cd\u6c47\u7f16\u5668\u6765\u5b9e\u9645\u89e3\u6790 x86_64 \u6307\u4ee4\u3002\u4e0b\u9762\u662f\u4e00\u4e2a C \u8bed\u8a00\u7a0b\u5e8f\u6846\u67b6&#xff0c;\u80fd\u591f\u89e3\u6790\u5e76\u6253\u5370\u4e24\u6761\u7b80\u5355\u7684 x86_64 \u673a\u5668\u6307\u4ee4&#xff1a;55&#xff08;push %rbp&#xff09;\u548c48 89 e5&#xff08;mov %rsp,%rbp&#xff09;\u3002<\/p>\n<p>\/\/ simple_disassembler.c<br \/>\n\/\/ \u4e00\u4e2a\u7b80\u6613\u7684 x86_64 \u53cd\u6c47\u7f16\u5668\u6846\u67b6<br \/>\n#include &lt;stdio.h&gt;<br \/>\n#include &lt;stdint.h&gt;<br \/>\n#include &lt;string.h&gt;<br \/>\n\/\/ \u6307\u4ee4\u7ed3\u6784\u4f53&#xff0c;\u5b58\u50a8\u89e3\u6790\u7ed3\u679c<br \/>\ntypedef struct {<br \/>\nuint8_t opcode;          \/\/ \u64cd\u4f5c\u7801<br \/>\nuint8_t modrm;           \/\/ ModR\/M \u5b57\u8282&#xff08;\u5982\u679c\u6709&#xff09;<br \/>\nuint8_t sib;             \/\/ SIB \u5b57\u8282&#xff08;\u5982\u679c\u6709&#xff09;<br \/>\nint32_t displacement;    \/\/ \u4f4d\u79fb\u503c<br \/>\nint64_t immediate;       \/\/ \u7acb\u5373\u6570<br \/>\nint length;              \/\/ \u6307\u4ee4\u603b\u957f\u5ea6&#xff08;\u5b57\u8282&#xff09;<br \/>\nchar mnemonic[32];       \/\/ \u52a9\u8bb0\u7b26<br \/>\nchar operands[64];       \/\/ \u64cd\u4f5c\u6570<br \/>\n} Instruction;<br \/>\n\/\/ \u89e3\u6790\u5355\u5b57\u8282\u6307\u4ee4 55 (push %rbp)<br \/>\nint parse_push_rbp(uint8_t *code, Instruction *inst) {<br \/>\nif (code[0] !&#061; 0x55) {<br \/>\nreturn 0; \/\/ \u4e0d\u662f push %rbp \u6307\u4ee4<br \/>\n}<br \/>\nstrcpy(inst-&amp;gt;mnemonic, &#034;push&#034;);<br \/>\nstrcpy(inst-&amp;gt;operands, &#034;%rbp&#034;);<br \/>\ninst-&amp;gt;opcode &#061; 0x55;<br \/>\ninst-&amp;gt;length &#061; 1;<br \/>\nreturn 1; \/\/ \u6210\u529f\u89e3\u6790<br \/>\n}<br \/>\n\/\/ \u89e3\u6790\u4e09\u5b57\u8282\u6307\u4ee4 48 89 e5 (mov %rsp,%rbp)<br \/>\nint parse_mov_rsp_rbp(uint8_t *code, Instruction *inst) {<br \/>\nif (code[0] !&#061; 0x48 || code[1] !&#061; 0x89 || code[2] !&#061; 0xe5) {<br \/>\nreturn 0; \/\/ \u4e0d\u662f mov %rsp,%rbp \u6307\u4ee4<br \/>\n}<br \/>\nstrcpy(inst-&amp;gt;mnemonic, &#034;mov&#034;);<br \/>\nstrcpy(inst-&amp;gt;operands, &#034;%rsp,%rbp&#034;);<br \/>\ninst-&amp;gt;opcode &#061; 0x89;<br \/>\ninst-&amp;gt;modrm &#061; 0xe5;  \/\/ ModR\/M \u5b57\u8282<br \/>\ninst-&amp;gt;length &#061; 3;<br \/>\n\/\/ \u89e3\u6790 ModR\/M \u5b57\u8282&#xff1a;0xe5 &#061; 11100101<br \/>\n\/\/ Mod&#061;11 (\u5bc4\u5b58\u5668\u5bfb\u5740), Reg&#061;100 (RSP), R\/M&#061;101 (RBP)<br \/>\ninst-&amp;gt;modrm &#061; 0xe5;<br \/>\nreturn 1; \/\/ \u6210\u529f\u89e3\u6790<br \/>\n}<br \/>\n\/\/ \u901a\u7528\u89e3\u6790\u51fd\u6570&#xff08;\u7b80\u5316\u7248&#xff09;<br \/>\nint parse_instruction(uint8_t *code, Instruction *inst) {<br \/>\nmemset(inst, 0, sizeof(Instruction));<br \/>\n\/\/ \u5c1d\u8bd5\u5339\u914d\u5df2\u77e5\u6307\u4ee4<br \/>\nif (parse_push_rbp(code, inst)) {<br \/>\nreturn 1;<br \/>\n}<br \/>\nif (parse_mov_rsp_rbp(code, inst)) {<br \/>\nreturn 1;<br \/>\n}<br \/>\n\/\/ \u672a\u77e5\u6307\u4ee4<br \/>\nstrcpy(inst-&amp;gt;mnemonic, &#034;unknown&#034;);<br \/>\nstrcpy(inst-&amp;gt;operands, &#034;&#034;);<br \/>\ninst-&amp;gt;length &#061; 1; \/\/ \u81f3\u5c11\u524d\u8fdb1\u5b57\u8282<br \/>\nreturn 0;<br \/>\n}<br \/>\n\/\/ \u6253\u5370\u6307\u4ee4\u4fe1\u606f<br \/>\nvoid print_instruction(Instruction *inst, uint8_t *code) {<br \/>\nprintf(&#034;\u673a\u5668\u7801: &#034;);<br \/>\nfor (int i &#061; 0; i &lt; inst-&gt;length; i&#043;&#043;) {<br \/>\nprintf(&#034;%02x &#034;, code[i]);<br \/>\n}<br \/>\nprintf(&#034;\\\\n&#034;);<br \/>\nprintf(&#034;\u6307\u4ee4: %s %s\\\\n&#034;, inst-&amp;gt;mnemonic, inst-&amp;gt;operands);<br \/>\nprintf(&#034;\u957f\u5ea6: %d \u5b57\u8282\\\\n&#034;, inst-&amp;gt;length);<br \/>\nif (inst-&amp;gt;modrm !&#061; 0) {<br \/>\nprintf(&#034;ModR\/M: 0x%02x\\\\n&#034;, inst-&amp;gt;modrm);<br \/>\nprintf(&#034;  Mod&#061;%d, Reg&#061;%d, R\/M&#061;%d\\\\n&#034;,<br \/>\n(inst-&amp;gt;modrm &amp;gt;&amp;gt; 6) &amp;amp; 0x03,<br \/>\n(inst-&amp;gt;modrm &amp;gt;&amp;gt; 3) &amp;amp; 0x07,<br \/>\ninst-&amp;gt;modrm &amp;amp; 0x07);<br \/>\n}<br \/>\nprintf(&#034;&#8212;\\\\n&#034;);<br \/>\n}<br \/>\nint main() {<br \/>\n\/\/ \u6d4b\u8bd5\u6570\u636e&#xff1a;\u4e24\u6761 x86_64 \u6307\u4ee4<br \/>\nuint8_t code1[] &#061; {0x55};                    \/\/ push %rbp<br \/>\nuint8_t code2[] &#061; {0x48, 0x89, 0xe5};        \/\/ mov %rsp,%rbp<br \/>\nInstruction inst;<br \/>\nprintf(&#034;&#061;&#061;&#061; \u7b80\u6613 x86_64 \u53cd\u6c47\u7f16\u5668\u6f14\u793a &#061;&#061;&#061;\\\\n\\\\n&#034;);<br \/>\n\/\/ \u89e3\u6790\u7b2c\u4e00\u6761\u6307\u4ee4<br \/>\nprintf(&#034;1. \u89e3\u6790\u6307\u4ee4: 55\\\\n&#034;);<br \/>\nif (parse_instruction(code1, &amp;amp;inst)) {<br \/>\nprint_instruction(&amp;amp;inst, code1);<br \/>\n}<br \/>\n\/\/ \u89e3\u6790\u7b2c\u4e8c\u6761\u6307\u4ee4<br \/>\nprintf(&#034;2. \u89e3\u6790\u6307\u4ee4: 48 89 e5\\\\n&#034;);<br \/>\nif (parse_instruction(code2, &amp;amp;inst)) {<br \/>\nprint_instruction(&amp;amp;inst, code2);<br \/>\n}<br \/>\n\/\/ \u6f14\u793a\u8f93\u51fa&#xff1a;<br \/>\nprintf(&#034;\u793a\u4f8b\u8f93\u51fa&#xff1a;\\\\n&#034;);<br \/>\nprintf(&#034;&#061;&#061;&#061; \u7b80\u6613 x86_64 \u53cd\u6c47\u7f16\u5668\u6f14\u793a &#061;&#061;&#061;\\\\n\\\\n&#034;);<br \/>\nprintf(&#034;1. \u89e3\u6790\u6307\u4ee4: 55\\\\n&#034;);<br \/>\nprintf(&#034;\u673a\u5668\u7801: 55 \\\\n&#034;);<br \/>\nprintf(&#034;\u6307\u4ee4: push %rbp\\\\n&#034;);<br \/>\nprintf(&#034;\u957f\u5ea6: 1 \u5b57\u8282\\\\n&#034;);<br \/>\nprintf(&#034;&#8212;\\\\n\\\\n&#034;);<br \/>\nprintf(&#034;2. \u89e3\u6790\u6307\u4ee4: 48 89 e5\\\\n&#034;);<br \/>\nprintf(&#034;\u673a\u5668\u7801: 48 89 e5 \\\\n&#034;);<br \/>\nprintf(&#034;\u6307\u4ee4: mov %rsp,%rbp\\\\n&#034;);<br \/>\nprintf(&#034;\u957f\u5ea6: 3 \u5b57\u8282\\\\n&#034;);<br \/>\nprintf(&#034;ModR\/M: 0xe5\\\\n&#034;);<br \/>\nprintf(&#034;  Mod&#061;3, Reg&#061;4, R\/M&#061;5\\\\n&#034;);<br \/>\nprintf(&#034;&#8212;\\\\n&#034;);<br \/>\nreturn 0;<br \/>\n}<\/p>\n<p>\u8fd9\u4e2a\u7b80\u6613\u53cd\u6c47\u7f16\u5668\u6846\u67b6\u5305\u542b\u4ee5\u4e0b\u5173\u952e\u90e8\u5206&#xff1a;<\/p>\n<li>\u6307\u4ee4\u7ed3\u6784\u4f53&#xff1a;Instruction \u7ed3\u6784\u4f53\u5b58\u50a8\u89e3\u6790\u540e\u7684\u6307\u4ee4\u4fe1\u606f&#xff0c;\u5305\u62ec\u64cd\u4f5c\u7801\u3001ModR\/M \u5b57\u8282\u3001\u6307\u4ee4\u957f\u5ea6\u3001\u52a9\u8bb0\u7b26\u548c\u64cd\u4f5c\u6570\u3002<\/li>\n<li>\u4e13\u7528\u89e3\u6790\u51fd\u6570&#xff1a;parse_push_rbp() \u548c parse_mov_rsp_rbp() \u5206\u522b\u5904\u7406\u4e24\u6761\u76ee\u6807\u6307\u4ee4\u7684\u89e3\u6790\u903b\u8f91\u3002<\/li>\n<li>\u901a\u7528\u89e3\u6790\u51fd\u6570&#xff1a;parse_instruction() \u5c1d\u8bd5\u5339\u914d\u5df2\u77e5\u6307\u4ee4\u6a21\u5f0f&#xff0c;\u4e3a\u6269\u5c55\u66f4\u591a\u6307\u4ee4\u63d0\u4f9b\u63a5\u53e3\u3002<\/li>\n<li>\u8f93\u51fa\u51fd\u6570&#xff1a;print_instruction() \u683c\u5f0f\u5316\u663e\u793a\u89e3\u6790\u7ed3\u679c&#xff0c;\u5305\u62ec\u673a\u5668\u7801\u3001\u6c47\u7f16\u6307\u4ee4\u548c\u7f16\u7801\u7ec6\u8282\u3002<\/li>\n<li>\u4e3b\u51fd\u6570&#xff1a;\u6f14\u793a\u5982\u4f55\u8c03\u7528\u89e3\u6790\u51fd\u6570\u5e76\u8f93\u51fa\u7ed3\u679c\u3002<\/li>\n<p>\u7f16\u8bd1\u4e0e\u8fd0\u884c&#xff1a;<\/p>\n<p># \u7f16\u8bd1\u7a0b\u5e8f<br \/>\ngcc -o simple_disassembler simple_disassembler.c<br \/>\n\u8fd0\u884c\u7a0b\u5e8f<br \/>\n.\/simple_disassembler<\/p>\n<p>\u8f93\u51fa\u8bf4\u660e&#xff1a;<\/p>\n<ul>\n<li>\u5bf9\u4e8e 55&#xff08;push %rbp&#xff09;&#xff1a;\u7a0b\u5e8f\u8bc6\u522b\u51fa\u8fd9\u662f\u5355\u5b57\u8282\u6307\u4ee4&#xff0c;\u64cd\u4f5c\u7801 0x55 \u76f4\u63a5\u7f16\u7801\u4e86 PUSH \u64cd\u4f5c\u548c RBP \u5bc4\u5b58\u5668\u3002<\/li>\n<li>\u5bf9\u4e8e 48 89 e5&#xff08;mov %rsp,%rbp&#xff09;&#xff1a;\u7a0b\u5e8f\u89e3\u6790\u51fa REX.W \u524d\u7f00&#xff08;0x48&#xff09;\u3001\u64cd\u4f5c\u7801&#xff08;0x89&#xff09;\u548c ModR\/M \u5b57\u8282&#xff08;0xe5&#xff09;&#xff0c;\u5e76\u5206\u89e3\u51fa Mod&#061;11&#xff08;\u5bc4\u5b58\u5668\u5bfb\u5740&#xff09;\u3001Reg&#061;100&#xff08;RSP&#xff09;\u3001R\/M&#061;101&#xff08;RBP&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u6269\u5c55\u601d\u8def&#xff1a;<\/p>\n<li>\u6dfb\u52a0\u66f4\u591a\u6307\u4ee4\u652f\u6301&#xff1a;\u53ef\u4ee5\u6269\u5c55\u89e3\u6790\u51fd\u6570\u6765\u5904\u7406\u66f4\u591a x86_64 \u6307\u4ee4\u3002<\/li>\n<li>\u5904\u7406\u6307\u4ee4\u524d\u7f00&#xff1a;\u5b8c\u5584\u5bf9 REX\u3001VEX\u3001EVEX \u7b49\u524d\u7f00\u7684\u89e3\u6790\u3002<\/li>\n<li>\u652f\u6301\u7acb\u5373\u6570\u548c\u4f4d\u79fb&#xff1a;\u6269\u5c55\u7ed3\u6784\u4f53\u4ee5\u5b58\u50a8\u7acb\u5373\u6570\u548c\u4f4d\u79fb\u503c\u3002<\/li>\n<li>\u8bfb\u53d6\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff1a;\u4ece ELF\/PE \u6587\u4ef6\u7684 .text \u8282\u8bfb\u53d6\u673a\u5668\u7801\u8fdb\u884c\u53cd\u6c47\u7f16\u3002<\/li>\n<li>\u751f\u6210\u5b8c\u6574\u53cd\u6c47\u7f16\u5217\u8868&#xff1a;\u904d\u5386\u4ee3\u7801\u6bb5&#xff0c;\u8fde\u7eed\u89e3\u6790\u6307\u4ee4\u5e76\u8f93\u51fa\u5b8c\u6574\u7684\u53cd\u6c47\u7f16\u4ee3\u7801\u3002<\/li>\n<p>\u901a\u8fc7\u8fd9\u4e2a\u7b80\u5355\u7684\u53cd\u6c47\u7f16\u5668\u6846\u67b6&#xff0c;\u8bfb\u8005\u53ef\u4ee5\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u673a\u5668\u7801\u89e3\u6790\u8fc7\u7a0b&#xff0c;\u4e3a\u6df1\u5165\u5b66\u4e60\u53cd\u6c47\u7f16\u6280\u672f\u548c\u4e8c\u8fdb\u5236\u5206\u6790\u6253\u4e0b\u57fa\u7840\u3002\u5b9e\u9645\u7684\u53cd\u6c47\u7f16\u5668&#xff08;\u5982 objdump\u3001IDA Pro&#xff09;\u8981\u590d\u6742\u5f97\u591a&#xff0c;\u9700\u8981\u5904\u7406\u5b8c\u6574\u7684 x86_64 \u6307\u4ee4\u96c6\u3001\u5404\u79cd\u5bfb\u5740\u6a21\u5f0f\u548c\u6587\u4ef6\u683c\u5f0f&#xff0c;\u4f46\u57fa\u672c\u539f\u7406\u4e0e\u6b64\u76f8\u4f3c\u3002<\/p>\n<h3 style=\"background-color:transparent\">8. \u8de8\u5e73\u53f0\u6ce8\u610f\u4e8b\u9879<\/h3>\n<h4>8.1 \u4ea4\u53c9\u7f16\u8bd1<\/h4>\n<p>\u4e3a\u4e0d\u540c\u5e73\u53f0\u751f\u6210\u673a\u5668\u7801&#xff1a;<\/p>\n<p># \u4e3a ARM \u67b6\u6784\u7f16\u8bd1<br \/>\narm-linux-gnueabi-gcc hello.c -o hello_arm<br \/>\n\u4e3a Windows \u7f16\u8bd1&#xff08;\u4f7f\u7528 mingw-w64&#xff09;<br \/>\nx86_64-w64-mingw32-gcc hello.c -o hello.exe<\/p>\n<h4>8.2 \u5b57\u8282\u5e8f&#xff08;Endianness&#xff09;<\/h4>\n<p>\u4e0d\u540c CPU \u67b6\u6784\u53ef\u80fd\u4f7f\u7528\u4e0d\u540c\u7684\u5b57\u8282\u5e8f&#xff1a;<\/p>\n<ul>\n<li>\u5c0f\u7aef\u5e8f&#xff08;Little-endian&#xff09;&#xff1a;x86\u3001ARM&#xff08;\u901a\u5e38&#xff09;<\/li>\n<li>\u5927\u7aef\u5e8f&#xff08;Big-endian&#xff09;&#xff1a;PowerPC\u3001SPARC<\/li>\n<li>\u5f71\u54cd\u591a\u5b57\u8282\u6570\u636e\u5728\u5185\u5b58\u4e2d\u7684\u5b58\u50a8\u987a\u5e8f<\/li>\n<\/ul>\n<h3>9. \u603b\u7ed3<\/h3>\n<p>C \u7a0b\u5e8f\u7f16\u7a0b\u53ef\u6267\u884c\u673a\u5668\u7801\u7684\u8fc7\u7a0b\u662f\u4e00\u4e2a\u4ece\u9ad8\u7ea7\u8bed\u8a00\u5230\u5e95\u5c42\u786c\u4ef6\u7684\u5b8c\u6574\u8f6c\u6362\u94fe\u3002\u901a\u8fc7\u7406\u89e3\u9884\u5904\u7406\u3001\u7f16\u8bd1\u3001\u6c47\u7f16\u548c\u94fe\u63a5\u56db\u4e2a\u9636\u6bb5&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5&#xff1a;<\/p>\n<li>\u7f16\u5199\u66f4\u9ad8\u6548\u7684\u4ee3\u7801&#xff0c;\u8ba9\u7f16\u8bd1\u5668\u751f\u6210\u66f4\u597d\u7684\u673a\u5668\u7801<\/li>\n<li>\u8c03\u8bd5\u65f6\u80fd\u591f\u7406\u89e3\u673a\u5668\u7801\u7ea7\u522b\u7684\u6267\u884c\u8fc7\u7a0b<\/li>\n<li>\u8fdb\u884c\u8de8\u5e73\u53f0\u5f00\u53d1\u548c\u4f18\u5316<\/li>\n<li>\u6df1\u5165\u7406\u89e3\u8ba1\u7b97\u673a\u7cfb\u7edf\u7684\u5de5\u4f5c\u539f\u7406<\/li>\n<p>\u638c\u63e1\u8fd9\u4e9b\u77e5\u8bc6\u4e0d\u4ec5\u6709\u52a9\u4e8e\u65e5\u5e38\u5f00\u53d1&#xff0c;\u4e5f\u662f\u6df1\u5165\u5b66\u4e60\u64cd\u4f5c\u7cfb\u7edf\u3001\u7f16\u8bd1\u539f\u7406\u7b49\u8ba1\u7b97\u673a\u6838\u5fc3\u8bfe\u7a0b\u7684\u91cd\u8981\u57fa\u7840\u3002\u6709\u5174\u8da3&#xff0c;\u6301\u7eed\u5173\u6ce8&#xff0c;\u4e00\u8d77\u4e86\u89e3\u4e0d\u4e00\u6837\u7684\u8ba1\u7b97\u673a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5f15\u8a00&#xff1a;\u4ece C \u4ee3\u7801\u5230\u673a\u5668\u7801\u7684\u65c5\u7a0b\u5f53\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684 C \u7a0b\u5e8f&#xff0c;\u6bd4\u5982\u7ecf\u5178\u7684 \\&#8221;Hello, World!\\&#8221;&#xff0c;\u7136\u540e\u901a\u8fc7\u7f16\u8bd1\u5668\u5c06\u5176\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u8fd9\u4e2a\u8fc7\u7a0b\u80cc\u540e\u9690\u85cf\u7740\u4e00\u7cfb\u5217\u590d\u6742\u7684\u8f6c\u6362\u6b65\u9aa4\u3002\u4ece\u4eba\u7c7b\u53ef\u8bfb\u7684 C \u6e90\u4ee3\u7801\u5230\u8ba1\u7b97\u673a\u80fd\u591f\u76f4\u63a5\u6267\u884c\u7684\u673a\u5668\u7801&#xff0c;\u9700\u8981\u7ecf\u8fc7\u9884\u5904\u7406\u3001\u7f16\u8bd1\u3001\u6c47\u7f16\u548c\u94fe\u63a5\u56db\u4e2a\u4e3b\u8981\u9636\u6bb5\u3002\u7406\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\u4e0d\u4ec5\u6709\u52a9\u4e8e\u6211\u4eec\u7f16\u5199\u66f4\u9ad8\u6548\u7684\u4ee3\u7801&#xff0c;\u8fd8\u80fd\u5728\u7a0b\u5e8f\u51fa\u73b0\u95ee\u9898\u65f6\u8fdb\u884c\u66f4\u7cbe\u51c6\u7684\u8c03\u8bd5\u3002\u4e3a\u4e86\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u4eceC\u6e90\u4ee3<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9126,9850,174,190],"topic":[],"class_list":["post-87138","post","type-post","status-publish","format-standard","hentry","category-server","tag-9126","tag-9850","tag-c","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87138.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. \u5f15\u8a00&#xff1a;\u4ece C \u4ee3\u7801\u5230\u673a\u5668\u7801\u7684\u65c5\u7a0b\u5f53\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684 C \u7a0b\u5e8f&#xff0c;\u6bd4\u5982\u7ecf\u5178\u7684 &quot;Hello, World!&quot;&#xff0c;\u7136\u540e\u901a\u8fc7\u7f16\u8bd1\u5668\u5c06\u5176\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u8fd9\u4e2a\u8fc7\u7a0b\u80cc\u540e\u9690\u85cf\u7740\u4e00\u7cfb\u5217\u590d\u6742\u7684\u8f6c\u6362\u6b65\u9aa4\u3002\u4ece\u4eba\u7c7b\u53ef\u8bfb\u7684 C \u6e90\u4ee3\u7801\u5230\u8ba1\u7b97\u673a\u80fd\u591f\u76f4\u63a5\u6267\u884c\u7684\u673a\u5668\u7801&#xff0c;\u9700\u8981\u7ecf\u8fc7\u9884\u5904\u7406\u3001\u7f16\u8bd1\u3001\u6c47\u7f16\u548c\u94fe\u63a5\u56db\u4e2a\u4e3b\u8981\u9636\u6bb5\u3002\u7406\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\u4e0d\u4ec5\u6709\u52a9\u4e8e\u6211\u4eec\u7f16\u5199\u66f4\u9ad8\u6548\u7684\u4ee3\u7801&#xff0c;\u8fd8\u80fd\u5728\u7a0b\u5e8f\u51fa\u73b0\u95ee\u9898\u65f6\u8fdb\u884c\u66f4\u7cbe\u51c6\u7684\u8c03\u8bd5\u3002\u4e3a\u4e86\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u4eceC\u6e90\u4ee3\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87138.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-29T13:40:34+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87138.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87138.html\",\"name\":\"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-29T13:40:34+00:00\",\"dateModified\":\"2026-07-29T13:40:34+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87138.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87138.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87138.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87138.html","og_locale":"zh_CN","og_type":"article","og_title":"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. \u5f15\u8a00&#xff1a;\u4ece C \u4ee3\u7801\u5230\u673a\u5668\u7801\u7684\u65c5\u7a0b\u5f53\u6211\u4eec\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684 C \u7a0b\u5e8f&#xff0c;\u6bd4\u5982\u7ecf\u5178\u7684 \"Hello, World!\"&#xff0c;\u7136\u540e\u901a\u8fc7\u7f16\u8bd1\u5668\u5c06\u5176\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6&#xff0c;\u8fd9\u4e2a\u8fc7\u7a0b\u80cc\u540e\u9690\u85cf\u7740\u4e00\u7cfb\u5217\u590d\u6742\u7684\u8f6c\u6362\u6b65\u9aa4\u3002\u4ece\u4eba\u7c7b\u53ef\u8bfb\u7684 C \u6e90\u4ee3\u7801\u5230\u8ba1\u7b97\u673a\u80fd\u591f\u76f4\u63a5\u6267\u884c\u7684\u673a\u5668\u7801&#xff0c;\u9700\u8981\u7ecf\u8fc7\u9884\u5904\u7406\u3001\u7f16\u8bd1\u3001\u6c47\u7f16\u548c\u94fe\u63a5\u56db\u4e2a\u4e3b\u8981\u9636\u6bb5\u3002\u7406\u89e3\u8fd9\u4e2a\u8fc7\u7a0b\u4e0d\u4ec5\u6709\u52a9\u4e8e\u6211\u4eec\u7f16\u5199\u66f4\u9ad8\u6548\u7684\u4ee3\u7801&#xff0c;\u8fd8\u80fd\u5728\u7a0b\u5e8f\u51fa\u73b0\u95ee\u9898\u65f6\u8fdb\u884c\u66f4\u7cbe\u51c6\u7684\u8c03\u8bd5\u3002\u4e3a\u4e86\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u4eceC\u6e90\u4ee3","og_url":"https:\/\/www.wsisp.com\/helps\/87138.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-29T13:40:34+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87138.html","url":"https:\/\/www.wsisp.com\/helps\/87138.html","name":"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-29T13:40:34+00:00","dateModified":"2026-07-29T13:40:34+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87138.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87138.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87138.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"C \u7a0b\u5e8f\u5982\u4f55\u7f16\u7a0b\u53ef\u6267\u884c\u7684\u673a\u5668\u7801\uff1a\u4ece\u6e90\u4ee3\u7801\u5230\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684\u5b8c\u6574\u8fc7\u7a0b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87138"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87138\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87138"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}