linux \u5185\u6838\u6587\u4ef6\u5168\u5206\u6790<\/strong>\uff0c\u5728\u4e0d\u540c\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u4e4b\u95f4\u8fd8\u662f\u6709\u597d\u591a\u7684\u5173\u8054\uff0c\u5256\u6790\u6838\u5fc3\u7684\u4e00\u90e8\u4efd\u4ee3\u7801\u4e00\u822c\u4f1a\u8981\u67e5\u770b\u5176\u5b83\u7684\u51e0\u4e2a\u76f8\u5173\u7684\u6587\u4ef6\uff0c\u4f46\u662f\u53ef\u80fd\u8fd9\u79cd\u6587\u4ef6\u8fd8\u4e0d\u5728\u540c\u4e00\u4e2a\u5b50\u76ee\u5f55\u4e0b\u3002\u4f53\u7cfb\u7684\u5e9e\u5927\u590d\u6742\u548c\u6587\u4ef6\u4e4b\u95f4\u5173\u8054\u7684\u7eb7\u7e41\u590d\u6742\uff0c\u53ef\u80fd\u5c31\u662f\u597d\u591a\u4eba\u5bf9\u5176\u671b\u800c\u751f\u754f\u7684\u4e3b\u8981\u8bf1\u56e0\u3002\u5176\u5b9e\uff0c\u8fd9\u4e9b\u4ee4\u4eba\u751f\u754f\u7684\u52b3\u52a8\u6240\u5e26\u6765\u7684\u56de\u62a5\u4e5f\u662f\u5341\u5206\u4ee4\u4eba\u7740\u8ff7\u7684\uff1a\u4f60\u9664\u4e86\u53ef\u4ee5\u4ece\u5c0f\u5b66\u5230\u597d\u591a\u7684\u8ba1\u7b97\u673a\u7684\u5e95\u5c42\u7684\u77e5\u8bc6\uff08\u5982\u4e0b\u8fb9\u5c06\u63d0\u5230\u7684\u7cfb\u7edf\u7684\u5f15\u5bfc\uff09\uff0c\u611f\u53d7\u5230\u6574\u4e2a\u64cd\u4f5c\u7cfb\u7edf\u4f53\u7cfb\u7ed3\u6784\u7684\u7cbe\u5999\u548c\u5728\u89e3\u51b3\u67d0\u4e2a\u5177\u4f53\u7ec6\u8282\u95ee\u9898\u65f6\uff0c\u7b97\u6cd5\u7684\u5de7\u5999\uff1b\u5e76\u4e14\u66f4\u91cd\u8981\u7684\u662f\uff1a\u5728\u6e90\u7801\u7684\u5256\u6790\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u90fd\u4f1a\u88ab\u4e00\u70b9\u4e00\u70b9\u5730\u3001\u6f5c\u79fb\u9ed8\u5316\u5730\u4e13\u4e1a\u5316\uff1b\u751a\u81f3\uff0c\u53ea\u8981\u5256\u6790\u975e\u5e38\u4e4b\u4e00\u7684\u4ee3\u7801\u540e\uff0c\u4f60\u8fd8\u4f1a\u6df1\u523b\u5730\u611f\u53d7\u5230\uff0c\u54ea\u4e9b\u6837\u7684\u4ee3\u7801\u624d\u662f\u4e00\u4e2a\u4e13\u4e1a\u7684\u7a0b\u5e8f\u5458\u5199\u7684\uff0c\u54ea\u4e9b\u6837\u7684\u4ee3\u7801\u662f\u4e00\u4e2a\u4e1a\u4f59\u7231\u597d\u8005\u5199\u7684\u3002\u4e3a\u4e86\u4f7f\u8bfb\u8005\u80fd\u66f4\u597d\u7684\u611f\u53d7\u5230\u8fd9\u4e00\u7279\u6027\uff0c\u4e0b\u8fb9\u4e3e\u4e86\u4e00\u4e2a\u5177\u4f53\u7684\u5185\u6838\u5256\u6790\u5b9e\u4f8b\uff0c\u5e0c\u671b\u80fd\u901a\u8fc7\u8fd9\u4e2a\u5b9e\u4f8b\uff0c\u4f7f\u8bfb\u8005\u5bf9Linux\u7684\u5185\u6838\u7684\u7ec4\u7ec7\u6709\u4e9b\u5177\u4f53\u7684\u8ba4\u8bc6\uff0c\u4ece\u4e2d\u8bfb\u8005\u4e5f\u53ef\u4ee5\u5b66\u5230\u4e00\u4e9b\u5bf9\u5185\u6838\u7684\u5256\u6790\u6280\u5de7\u3002\u4ee5\u4e0b\u5373\u4e3a\u5256\u6790\u5b9e\u4f8b\uff1a\u3010\u4e00\u3011\u64cd\u4f5c\u5e73\u53f0\u786c\u4ef6\uff1acpuintelPentiumII\u8f6f\u4ef6\uff1aRedhatLinux6.0;\u5185\u6838\u7248\u672c2.2.5\u3010\u4e8c\u3011\u76f8\u5173\u5185\u6838\u6e90\u4ee3\u7801\u5256\u67901\uff0e\u7cfb\u7edf\u7684\u5f15\u5bfc\u548c\u521d\u59cb\u5316\uff1aLinux\u7cfb\u7edf\u7684\u5f15\u5bfc\u6709\u597d\u51e0\u79cd\u65b9\u6cd5\uff1a\u5e38\u89c1\u7684\u6709Lilo,Loadin\u5f15\u5bfc\u548cLinux\u7684\u81ea\u4e3e\u5f15\u5bfc\uff08bootsect-loader\u800c\u524d\u8005\u6240\u5bf9\u5e94\u6e90\u7a0b\u5e8f\u4e3aarch\/i386\/boot\/bootsect.S\uff0c\u5b83\u4e3a\u5b9e\u6a21\u5f0f\u7684\u6c47\u7f16\u7a0b\u5e8flinux\u7cfb\u7edf\u5165\u95e8\u5b66\u4e60\uff0c\u9650\u4e8e\u7bc7\u5e45\u5728\u6b64\u4e0d\u505a\u5256\u6790\uff1b\u65e0\u8bba\u662f\u54ea\u79cd\u5f15\u5bfc\u65b9\u6cd5\uff0c\u6700\u540e\u90fd\u8981\u8df3\u8f6c\u5230arch\/i386\/Kernel\/setup.Ssetup.S\u4e3b\u8981\u662f\u8fdb\u884c\u65f6\u6a21\u5f0f\u4e0b\u7684\u521d\u59cb\u5316linux\u7cfb\u7edf\u5165\u95e8\u5b66\u4e60\uff0c\u4e3a\u7cfb\u7edf\u6b65\u5165\u4fdd\u62a4\u6a21\u5f0f\u505a\u6253\u7b97\uff1b\u968f\u540e\uff0c\u7cfb\u7edf\u6267\u884carch\/i386\/kernel\/head.S\u5bf9\u7ecf\u538b\u7f29\u540e\u50a8\u5b58\u7684\u5185\u6838\u8981\u5148\u6267\u884carch\/i386\/boot\/compressed\/head.S);head.S\u4e2d\u5b9a\u4e49\u7684\u4e00\u6bb5\u6c47\u7f16\u7a0b\u5e8fsetup_idt\uff0c\u5b83\u8d1f\u8d23\u6784\u5efa\u4e00\u5f20256idt\u8868(InterruptDescriptorTable),\u5176\u4e2d\u5305\u62ec\u7cfb\u7edf\u8c03\u7528\u603b\u63a7\u7a0b\u5e8fsystem_call\u7684\u5165\u53e3\u5730\u5740;\u5176\u5b9e\uff0c\u9664\u6b64\u4e4b\u5916\uff0chead.S\u8fd8\u8981\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u521d\u59cb\u5316\u5de5\u4f5c\uff1b2\uff0e\u7cfb\u7edf\u521d\u59cb\u5316\u540e\u8fd0\u884c\u7684\u7b2c\u4e00\u4e2a\u5185\u6838\u7a0b\u5e8fasmlinkagevoid__initstart_kernel(void)\u5b9a\u4e49\u5728\/usr\/src\/linux\/init\/main.c\u5b83\u901a\u8fc7\u8c03\u7528usr\/src\/linux\/arch\/i386\/kernel\/traps.c\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570void__inittrap_init(void)\u628a\u5404\u81ea\u9677\u548c\u4e2d\u65ad\u670d\u52a1\u7a0b\u5e8f\u7684\u5165\u53e3\u5730\u5740\u8bbe\u7f6e\u5230idt\u5176\u4e2d\u7cfb\u7edf\u8c03\u7528\u603b\u63a7\u7a0b\u5e8fsystem_cal\u5c31\u662f\u4e2d\u65ad\u670d\u52a1\u7a0b\u5e8f\u4e4b\u4e00;void__inittrap_init(void)\u51fd\u6570\u5219\u901a\u8fc7\u8c03\u7528\u4e00\u4e2a\u5b8fset_system_gate(SYSCALL_VECTOR,&system_call);\u628a\u7cfb\u7edf\u8c03\u7528\u603b\u63a7\u7a0b\u5e8f\u7684\u5165\u53e3\u6302\u5728\u4e2d\u65ad0x80\u5176\u4e2dSYSCALL_VECTOR\u662f\u5b9a\u4e49\u5728\/usr\/src\/linux\/arch\/i386\/kernel\/irq.hsystem_call\u5373\u4e3a\u4e2d\u65ad\u603b\u63a7\u7a0b\u5e8f\u7684\u5165\u53e3\u5730\u5740\u4e2d\u65ad\u603b\u63a7\u7a0b\u5e8f\u7528\u6c47\u7f16\u8bed\u8a00\u5b9a\u4e49\u5728\/usr\/src\/linux\/arch\/i386\/kernel\/entry.S\u5e76\u4f9d\u636e\u7cfb\u7edf\u8c03\u7528\u5411\u91cf\uff0c\u4f7f\u5904\u7406\u673a\u8df3\u8f6c\u5230\u4fdd\u5b58\u5728sys_call_table\u8868\u4e2d\u7684\u76f8\u5e94\u7cfb\u7edf\u670d\u52a1\u7c7b\u5e93\u7684\u5165\u53e3\u800c\u7cfb\u7edf\u8c03\u7528\u5411\u91cf\u5219\u5b9a\u4e49\u5728\/usr\/src\/linux\/include\/asm-386\/unistd.hsys_call_table\u8868\u5b9a\u4e49\u5728\/usr\/src\/linux\/arch\/i386\/kernel\/entry.S\u540c\u65f6\u5728\/usr\/src\/linux\/include\/asm-386\/unistd.h\u4e2d\u4e5f\u5b9a\u4e49\u4e86\u7cfb\u7edf\u8c03\u7528\u7684\u7528\u6237\u7f16\u7a0b\u63d2\u53e3linux\u7684\u7cfb\u7edf\u8c03\u7528\u4e5f\u8c61dos\u7cfb\u7edf\u7684int21h\u4e2d\u65ad\u670d\u52a1\u5b83\u628a0x80\u4e4b\u540e\u8f6c\u5165\u4fdd\u5b58\u5728sys_call_table\u8868\u4e2d\u7684\u5404\u7c7b\u4e2d\u65ad\u670d\u52a1\u7c7b\u5e93\u7684\u5165\u53e3\u5730\u5740\u8981\u964d\u4f4e\u4e00\u4e2a\u7cfb\u7edf\u8c03\u7528\u5c31\u5fc5\u987b\u5728sys_call_table\u8868\u4e2d\u964d\u4f4e\u4e00\u5e76\u5728\u5176\u4e2d\u4fdd\u5b58\u597d\u81ea\u5df1\u7684\u7cfb\u7edf\u670d\u52a1\u7c7b\u5e93\u7684\u5165\u53e3\u5730\u5740,\u4e4b\u540e\u91cd\u65b0\u7f16\u8bd1\u5185\u6838\uff0c\u5176\u5b9e\uff0c\u7cfb\u7edf\u670d\u52a1\u7c7b\u5e93\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/p>\n\u7531\u6b64\u53ef\u77e5\u5728\u6b64\u7248linux\u5185\u6838\u6e90\u7a0b\u5e8f\u4e2d,\u4e0e\u7cfb\u7edf\u8c03\u7528\u76f8\u5173\u7684\u6e90\u7a0b\u5e8f\u6587\u4ef6\u5c31\u5305\u62ec\u4ee5\u4e0b\u8fd9\u79cd1\uff0earch\/i386\/boot\/bootsect.S2\uff0earch\/i386\/Kernel\/setup.S3\uff0earch\/i386\/boot\/compressed\/head.S4\uff0earch\/i386\/kernel\/head.S5\uff0einit\/main.c6\uff0earch\/i386\/kernel\/traps.c7\uff0earch\/i386\/kernel\/entry.S8\uff0earch\/i386\/kernel\/irq.h9\uff0einclude\/asm-386\/unistd.h\u5176\u5b9e\uff0c\u8fd9\u53ea\u662f\u6d89\u53ca\u5230\u7684\u51e0\u4e2a\u4e3b\u8981\u6587\u4ef6\u3002\u800c\u4e8b\u5b9e\u4e0a\uff0c\u964d\u4f4e\u7cfb\u7edf\u8c03\u7528\u771f\u6b63\u8981\u66f4\u6539\u6587\u4ef6\u53ea\u6709include\/asm-386\/unistd.harch\/i386\/kernel\/entry.S\u4e24\u4e2a;kernel\/sys.c\u4e2d\u964d\u4f4e\u7cfb\u7edf\u670d\u52a1\u7c7b\u5e93\u5982\u4e0b\uff1aasmlinkageintsys_addtotal(intnumdata)inti=0,enddata=0;while(i<\/p>\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
Linux\u5185\u6838\u89e3\u8bfb\u5165\u95e8\u9488\u5bf9\u597d\u591aLinux\u7231\u597d\u8005\u5bf9\u5185\u6838\u5f88\u6709\u5174\u8da3\u5374\u65e0\u4ece\u4e0b\u53e3\uff0c\u672c\u6587\u65e8\u5728\u4ecb\u7ecd\u4e00\u79cd\u89e3\u8bfblinux\u6838\u6e90\u7801\u7684\u5165\u95e8\u65b9\u6cd5<\/p>\n","protected":false},"author":1,"featured_media":269391,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-269390","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/269390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=269390"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/269390\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/269391"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=269390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=269390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=269390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}