{"id":136406,"date":"2019-02-26T08:25:09","date_gmt":"2019-02-26T00:25:09","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=136406"},"modified":"2019-02-18T14:29:29","modified_gmt":"2019-02-18T06:29:29","slug":"system-map-document","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/system-map-document.html","title":{"rendered":"System.map\u6587\u4ef6\u7684\u4f5c\u7528\u89e3\u6790"},"content":{"rendered":"
\u6709\u5173System.map\u6587\u4ef6\u7684\u4fe1\u606f\u597d\u8c61\u5f88\u7f3a\u4e4f\u3002\u5176\u5b9e\u5b83\u4e00\u70b9\u4e5f\u4e0d\u795e\u79d8\uff0c\u5e76\u4e14\u5728\u6574\u4e2a\u4e8b\u60c5\u5f53\u4e2d\u5b83\u5e76\u4e0d\u8c61\u770b\u4e0a\u53bb\u90a3\u4e48\u5f97\u91cd\u8981\u3002\u4f46\u662f\u7531\u4e8e\u7f3a\u4e4f\u5fc5\u8981\u7684\u6587\u6863\u8bf4\u660e\uff0c\u4f7f\u5176\u663e\u5f97\u6bd4\u8f83\u795e\u79d8\u3002\u5b83\u5c31\u8c61\u8033\u5782\uff0c\u6211\u4eec\u6bcf\u4e2a\u4eba\u90fd\u6709\uff0c\u4f46\u5374\u4e0d\u77e5\u9053\u662f\u5e72\u4ec0\u4e48\u7528\u7684\u3002\u672c\u7f51\u9875\u5c31\u662f\u7528\u6765\u8bf4\u660e\u8fd9\u4e2a\u95ee\u9898\u7684\u3002<\/p>\n
\u6ce8\u610f\uff0c\u6211\u5e76\u4e0d\u4f1a\u662f\u767e\u5206\u4e4b\u4e00\u767e\u6b63\u786e\u7684\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u7cfb\u7edf\u5f88\u53ef\u80fd\u6ca1\u6709\/proc\u6587\u4ef6\u7cfb\u7edf\u652f\u6301\uff0c\u4f46\u662f\u5927\u591a\u6570\u7cfb\u7edf\u80af\u5b9a\u6709\u3002\u8fd9\u91cc\u6211\u5047\u5b9a\u4f60\u662f\u201c\u968f\u5927\u6d41\u7684\u201d\uff0c\u5e76\u6709\u4e00\u4e2a\u5178\u578b\u914d\u7f6e\u7684\u7cfb\u7edf\u3002<\/p>\n
\u67d0\u4e9b\u6709\u5173\u5185\u6838\u51fa\u9519(oops)\u7684\u9610\u8ff0\u6765\u81ea\u4e8eAlessandro Rubini\u7684\u201cLinux\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u201d \u4e00\u4e66\uff0c\u6211\u662f\u4ece\u5176\u4e2d\u5b66\u5230\u5927\u90e8\u5206\u5185\u6838\u7f16\u7a0b\u77e5\u8bc6\u7684\u3002<\/p>\n
\u5728\u7f16\u7a0b\u4e2d\uff0c\u4e00\u4e2a\u7b26\u53f7(symbol)\u662f\u4e00\u4e2a\u7a0b\u5e8f\u7684\u521b\u5efa\u5757\uff1a\u5b83\u662f\u4e00\u4e2a\u53d8\u91cf\u540d\u6216\u4e00\u4e2a\u51fd\u6570\u540d\u3002 \u6b63\u5982\u4f60\u81ea\u5df1\u7f16\u5236\u7684\u7a0b\u5e8f\u4e00\u6837\uff0c\u5185\u6838\u5177\u6709\u5404\u79cd\u7b26\u53f7\u4e5f\u662f\u4e0d\u5e94\u8be5\u611f\u5230\u60ca\u5947\u7684\u3002\u5f53\u7136\uff0c\u533a\u522b\u5728 \u4e8e\u5185\u6838\u662f\u4e00\u975e\u5e38\u590d\u6742\u7684\u4ee3\u7801\u5757\uff0c\u5e76\u4e14\u542b\u6709\u8bb8\u591a\u3001\u8bb8\u591a\u7684\u5168\u5c40\u7b26\u53f7\u3002<\/p>\n
\u5185\u6838\u5e76\u4e0d\u4f7f\u7528\u7b26\u53f7\u540d\u3002\u5b83\u662f\u901a\u8fc7\u53d8\u91cf\u6216\u51fd\u6570\u7684\u5730\u5740(\u6307\u9488)\u6765\u4f7f\u7528\u53d8\u91cf\u6216\u51fd\u6570\u7684\uff0c\u800c \u4e0d\u662f\u4f7f\u7528size_t BytesRead\uff0c\u5185\u6838\u66f4\u559c\u6b22\u4f7f\u7528(\u4f8b\u5982)c0343f20\u6765\u5f15\u7528 \u8fd9\u4e2a\u53d8\u91cf\u3002<\/p>\n
\u800c\u53e6\u4e00\u65b9\u9762\uff0c\u4eba\u4eec\u5e76\u4e0d\u559c\u6b22\u8c61c0343f20\u8fd9\u6837\u7684\u540d\u5b57\u3002\u6211\u4eec\u8ddf\u559c\u6b22\u4f7f\u7528\u8c61 size_t BytesRead\u8fd9\u6837\u7684\u8868\u793a\u3002\u901a\u5e38\uff0c\u8fd9\u5e76\u4e0d\u4f1a\u5e26\u6765\u4ec0\u4e48\u95ee\u9898\u3002\u5185\u6838\u4e3b\u8981 \u662f\u7528C\u8bed\u8a00\u5199\u6210\u7684\uff0c\u6240\u4ee5\u5728\u6211\u4eec\u7f16\u7a0b\u65f6\u7f16\u8bd1\u5668\/\u8fde\u63a5\u7a0b\u5e8f\u5141\u8bb8\u6211\u4eec\u4f7f\u7528\u7b26\u53f7\u540d\uff0c\u5e76\u4e14\u4f7f \u5185\u6838\u5728\u8fd0\u884c\u65f6\u4f7f\u7528\u5730\u5740\u8868\u793a\u3002\u8fd9\u6837\u5927\u5bb6\u90fd\u6ee1\u610f\u4e86\u3002<\/p>\n
\u7136\u800c\uff0c\u5b58\u5728\u4e00\u79cd\u60c5\u51b5\uff0c\u6b64\u65f6\u6211\u4eec\u9700\u8981\u77e5\u9053\u4e00\u4e2a\u7b26\u53f7\u7684\u5730\u5740\uff08\u6216\u8005\u4e00\u4e2a\u5730\u5740\u5bf9\u5e94\u7684 \u7b26\u53f7\uff09\u3002\u8fd9\u662f\u901a\u8fc7\u7b26\u53f7\u8868\u6765\u505a\u5230\u7684\uff0c\u4e0egdb\u80fd\u591f\u4ece\u4e00\u4e2a\u5730\u5740\u7ed9\u51fa\u51fd\u6570\u540d\uff08\u6216\u8005\u7ed9\u51fa\u4e00\u4e2a \u51fd\u6570\u540d\u7684\u5730\u5740\uff09\u7684\u60c5\u51b5\u5f88\u76f8\u4f3c\u3002\u7b26\u53f7\u8868\u662f\u6240\u6709\u7b26\u53f7\u53ca\u5176\u5bf9\u5e94\u5730\u5740\u7684\u4e00\u4e2a\u5217\u8868\u3002\u8fd9\u91cc\u662f \u4e00\u4e2a\u7b26\u53f7\u8868\u4f8b\u5b50\uff1a<\/p>\n
c03441a0 B dmi_broken\r\n\r\nc03441a4 B is_sony_vaio_laptop\r\n\r\nc03441c0 b dmi_ident\r\n\r\nc0344200 b pci_bios_present\r\n\r\nc0344204 b pirq_table\r\n\r\nc0344208 b pirq_router\r\n\r\nc034420c b pirq_router_dev\r\n\r\nc0344220 b ascii_buffer\r\n\r\nc0344224 b ascii_buf_bytes\r\n<\/pre>\n\u4f60\u53ef\u4ee5\u770b\u51fa\u540d\u79f0\u4e3admi_broken\u7684\u53d8\u91cf\u4f4d\u4e8e\u5185\u6838\u5730\u5740c03441a0\u5904\u3002<\/p>\n
\u4ec0\u4e48\u662fSystem.map\u6587\u4ef6?<\/strong><\/span><\/div>\n\u6709\u4e24\u4e2a\u6587\u4ef6\u662f\u7528\u4f5c\u7b26\u53f7\u8868\u7684:<\/p>\n
\n
- \/proc\/ksyms<\/li>\n
- System.map<\/li>\n<\/ol>\n
\u8fd9\u91cc\uff0c\u4f60\u73b0\u5728\u53ef\u4ee5\u77e5\u9053System.map\u6587\u4ef6\u662f\u5e72\u4ec0\u4e48\u7528\u7684\u4e86\u3002<\/p>\n
\u6bcf\u5f53\u4f60\u7f16\u8bd1\u4e00\u4e2a\u65b0\u5185\u6838\u65f6\uff0c\u5404\u79cd\u7b26\u53f7\u540d\u7684\u5730\u5740\u5b9a\u4f1a\u53d8\u5316\u3002<\/p>\n
\/proc\/ksyms \u662f\u4e00\u4e2a \"proc\u6587\u4ef6\" \u5e76\u4e14\u662f\u5728\u5185\u6838\u542f\u52a8\u65f6\u521b\u5efa\u7684\u3002\u5b9e\u9645\u4e0a \u5b83\u4e0d\u662f\u4e00\u4e2a\u771f\u5b9e\u7684\u6587\u4ef6\uff1b\u5b83\u53ea\u662f\u5185\u6838\u6570\u636e\u7684\u7b80\u5355\u8868\u793a\u5f62\u5f0f\uff0c\u5448\u73b0\u51fa\u8c61\u4e00\u4e2a\u78c1\u76d8\u6587\u4ef6\u4f3c \u7684\u3002\u5982\u679c\u4f60\u4e0d\u76f8\u4fe1\u6211\uff0c\u90a3\u4e48\u5c31\u8bd5\u8bd5\u627e\u51fa\/proc\/ksyms\u7684\u6587\u4ef6\u5927\u5c0f\u6765\u3002\u56e0\u6b64\uff0c \u5bf9\u4e8e\u5f53\u524d\u8fd0\u884c\u7684\u5185\u6838\u6765\u8bf4\uff0c\u5b83\u603b\u662f\u6b63\u786e\u7684..<\/p>\n
\u7136\u800c\uff0cSystem.map\u5374\u662f\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u4e00\u4e2a\u771f\u5b9e\u6587\u4ef6\u3002\u5f53\u4f60\u7f16\u8bd1\u4e00\u4e2a\u65b0\u5185\u6838\u65f6\uff0c\u4f60\u539f \u6765\u7684System.map\u4e2d\u7684\u7b26\u53f7\u4fe1\u606f\u5c31\u4e0d\u6b63\u786e\u4e86\u3002\u968f\u7740\u6bcf\u6b21\u5185\u6838\u7684\u7f16\u8bd1\uff0c\u5c31\u4f1a\u4ea7\u751f\u4e00\u4e2a\u65b0\u7684 System.map\u6587\u4ef6\uff0c\u5e76\u4e14\u9700\u8981\u7528\u8be5\u6587\u4ef6\u53d6\u4ee3\u539f\u6765\u7684\u6587\u4ef6\u3002<\/p>\n
\u4ec0\u4e48\u662f\u4e00\u4e2aOops?<\/strong><\/span><\/div>\n\u5728\u81ea\u5df1\u7f16\u5236\u7684\u7a0b\u5e8f\u4e2d\u6700\u5e38\u89c1\u7684\u51fa\u9519\u60c5\u51b5\u662f\u4ec0\u4e48?\u662f\u6bb5\u51fa\u9519(segfault)\uff0c\u4fe1\u53f711\u3002<\/p>\n
Linux\u5185\u6838\u4e2d\u6700\u5e38\u89c1\u7684bug\u662f\u4ec0\u4e48?\u4e5f\u662f\u6bb5\u51fa\u9519\u3002\u9664\u6b64\uff0c\u6b63\u5982\u4f60\u60f3\u8c61\u7684\u90a3\u6837\uff0c\u6bb5\u51fa \u9519\u7684\u95ee\u9898\u662f\u975e\u5e38\u590d\u6742\u7684\uff0c\u800c\u4e14\u4e5f\u662f\u975e\u5e38\u4e25\u91cd\u7684\u3002\u5f53\u5185\u6838\u5f15\u7528\u4e86\u4e00\u4e2a\u65e0\u6548\u6307\u9488\u65f6\uff0c\u5e76\u4e0d \u79f0\u5176\u4e3a\u6bb5\u51fa\u9519 -- \u800c\u88ab\u79f0\u4e3a\"oops\"\u3002\u4e00\u4e2aoops\u8868\u660e\u5185\u6838\u5b58\u5728\u4e00\u4e2abug\uff0c\u5e94\u8be5\u603b\u662f\u63d0\u51fa \u62a5\u544a\u5e76\u4fee\u6b63\u8be5bug\u3002<\/p>\n
\u8bf7\u6ce8\u610f\uff0c\u4e00\u4e2aoops\u4e0e\u4e00\u4e2a\u6bb5\u51fa\u9519\u5e76\u4e0d\u662f\u4e00\u56de\u4e8b\u3002\u4f60\u7684\u7a0b\u5e8f\u5e76\u4e0d\u80fd\u4ece\u6bb5\u51fa\u9519\u4e2d\u6062\u590d \u8fc7\u6765\uff0c\u5f53\u51fa\u73b0\u4e00\u4e2aoops\u65f6\uff0c\u5e76\u4e0d\u610f\u5473\u7740\u5185\u6838\u80af\u5b9a\u5904\u4e8e\u4e0d\u7a33\u5b9a\u7684\u72b6\u6001\u3002Linux\u5185\u6838\u662f\u975e\u5e38 \u5065\u58ee\u7684\uff1b\u4e00\u4e2aoops\u53ef\u80fd\u4ec5\u6740\u6b7b\u4e86\u5f53\u524d\u8fdb\u7a0b\uff0c\u5e76\u4f7f\u4f59\u4e0b\u7684\u5185\u6838\u5904\u4e8e\u4e00\u4e2a\u826f\u597d\u7684\u3001\u7a33\u5b9a\u7684 \u72b6\u6001\u3002<\/p>\n
\u4e00\u4e2aoops\u5e76\u975e\u662f\u5185\u6838\u6b7b\u5faa\u73af(panic)\u3002\u5728\u5185\u6838\u8c03\u7528\u4e86panic()\u51fd\u6570\u540e\uff0c\u5185\u6838\u5c31\u4e0d\u80fd \u7ee7\u7eed\u8fd0\u884c\u4e86\uff1b\u6b64\u65f6\u7cfb\u7edf\u5c31\u5904\u4e8e\u505c\u987f\u72b6\u6001\u5e76\u4e14\u5fc5\u987b\u91cd\u542f\u3002\u5982\u679c\u7cfb\u7edf\u4e2d\u5173\u952e\u90e8\u5206\u906d\u5230\u7834\u574f \u90a3\u4e48\u4e00\u4e2aoops\u4e5f\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5185\u6838\u8fdb\u5165\u6b7b\u5faa\u73af(panic)\u3002\u4f8b\u5982\uff0c\u8bbe\u5907\u9a71\u52a8\u7a0b\u5e8f\u4e2d \u51fa\u73b0\u7684oops\u5c31\u51e0\u4e4e\u4e0d\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u8fdb\u884c\u6b7b\u5faa\u73af\u3002<\/p>\n
\u5f53\u51fa\u73b0\u4e00\u4e2aoops\u65f6\uff0c\u7cfb\u7edf\u5c31\u4f1a\u663e\u793a\u51fa\u7528\u4e8e\u8c03\u8bd5\u95ee\u9898\u7684\u76f8\u5173\u4fe1\u606f\uff0c\u6bd4\u5982\u6240\u6709CPU\u5bc4\u5b58\u5668 \u4e2d\u7684\u5185\u5bb9\u4ee5\u53ca\u9875\u63cf\u8ff0\u7b26\u8868\u7684\u4f4d\u7f6e\u7b49\uff0c\u5c24\u5176\u4f1a\u8c61\u4e0b\u9762\u90a3\u6837\u6253\u5370\u51faEIP(\u6307\u4ee4\u6307\u9488)\u7684\u5185\u5bb9\uff1a<\/p>\n
EIP: 0010:[<00000000>]\r\n\r\nCall Trace: []<\/pre>\n\u4e00\u4e2aOops\u4e0eSystem.map\u6587\u4ef6\u6709\u4ec0\u4e48\u5173\u7cfb\u5462?<\/strong><\/span><\/div>\n\u6211\u60f3\u4f60\u4e5f\u4f1a\u8ba4\u4e3aEIP\u548cCall Trace\u6240\u7ed9\u51fa\u7684\u4fe1\u606f\u5e76\u4e0d\u591a\uff0c\u4f46\u662f\u91cd\u8981 \u7684\u662f\uff0c\u5bf9\u4e8e\u5185\u6838\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\u8fd9\u4e9b\u4fe1\u606f\u4e5f\u662f\u4e0d\u591f\u7684\u3002\u7531\u4e8e\u4e00\u4e2a\u7b26\u53f7\u5e76\u6ca1\u6709\u56fa\u5b9a\u7684\u5730\u5740\uff0c c010b860\u53ef\u4ee5\u6307\u5411\u4efb\u4f55\u5730\u65b9\u3002<\/p>\n
\u4e3a\u4e86\u5e2e\u52a9\u6211\u4eec\u4f7f\u7528oops\u542b\u7cca\u7684\u8f93\u51fa\uff0cLinux\u4f7f\u7528\u4e86\u4e00\u4e2a\u79f0\u4e3aklogd(\u5185\u6838\u65e5\u5fd7\u540e\u53f0\u7a0b\u5e8f)\u7684 \u540e\u53f0\u7a0b\u5e8f\uff0cklogd\u4f1a\u622a\u53d6\u5185\u6838oops\u5e76\u4e14\u4f7f\u7528syslogd\u5c06\u5176\u8bb0\u5f55\u4e0b\u6765\uff0c\u5e76\u5c06\u67d0\u4e9b\u8c61c010b860 \u7684\u4fe1\u606f\u8f6c\u6362\u6210\u6211\u4eec\u53ef\u4ee5\u8bc6\u522b\u548c\u4f7f\u7528\u7684\u4fe1\u606f\u3002\u6362\u53e5\u8bdd\u8bf4\uff0cklogd\u662f\u4e00\u4e2a\u5185\u6838\u6d88\u606f\u8bb0\u5f55\u5668(logger)\uff0c \u5b83\u53ef\u4ee5\u8fdb\u884c\u540d\u5b57-\u5730\u5740\u4e4b\u95f4\u7684\u89e3\u6790\u3002\u4e00\u65e6klogd\u5f00\u59cb\u8f6c\u6362\u5185\u6838\u6d88\u606f\uff0c\u5b83\u5c31\u4f7f\u7528\u624b\u5934\u7684\u8bb0\u5f55\u5668\uff0c \u5c06\u6574\u4e2a\u7cfb\u7edf\u7684\u6d88\u606f\u8bb0\u5f55\u4e0b\u6765\uff0c\u901a\u5e38\u662f\u4f7f\u7528syslogd\u8bb0\u5f55\u5668\u3002<\/p>\n
\u4e3a\u4e86\u8fdb\u884c\u540d\u5b57-\u5730\u5740\u89e3\u6790\uff0cklogd\u5c31\u8981\u7528\u5230System.map\u6587\u4ef6\u3002\u6211\u60f3\u4f60\u73b0\u5728 \u77e5\u9053\u4e00\u4e2aoops\u4e0eSystem.map\u7684\u5173\u7cfb\u4e86\u3002<\/p>\n
\u6df1\u5165\u8bf4\u660e\uff1a \u5176\u5b9eklogd\u4f1a\u6267\u884c\u4e24\u7c7b\u5730\u5740\u89e3\u6790\u6d3b\u52a8\u3002<\/p>\n
\n
- \u9759\u6001\u8f6c\u6362\uff0c\u5c06\u4f7f\u7528System.map\u6587\u4ef6\u3002<\/li>\n
- \u52a8\u6001\u8f6c\u6362\uff0c\u8be5\u65b9\u5f0f\u7528\u4e8e\u53ef\u52a0\u8f7d\u6a21\u5757\uff0c\u4e0d\u4f7f\u7528System.map\uff0c\u56e0\u6b64\u4e0e\u672c\u8ba8\u8bba\u6ca1\u6709\u5173\u7cfb\uff0c\u4f46\u6211\u4ecd\u7136\u5bf9\u5176\u52a0\u4ee5\u7b80\u5355\u8bf4\u660e\u3002<\/li>\n<\/ul>\n
Klogd\u52a8\u6001\u8f6c\u6362
\n\u5047\u8bbe\u4f60\u52a0\u8f7d\u4e86\u4e00\u4e2a\u4ea7\u751foops\u7684\u5185\u6838\u6a21\u5757\u3002\u4e8e\u662f\u5c31\u4f1a\u4ea7\u751f\u4e00\u4e2aoops\u6d88\u606f\uff0cklogd\u5c31\u4f1a\u622a\u83b7\u5b83\uff0c\u5e76\u53d1\u73b0\u8be5oops\u53d1\u751f\u5728d00cf810\u5904\u3002\u7531\u4e8e\u8be5\u5730\u5740\u5c5e\u4e8e\u52a8\u6001\u52a0\u8f7d\u6a21\u5757\uff0c\u56e0\u6b64\u5728System.map\u6587\u4ef6\u4e2d\u6ca1\u6709\u5bf9\u5e94\u6761\u76ee\u3002klogd\u5c06\u4f1a\u5728\u5176\u4e2d\u5bfb\u627e\u5e76\u4f1a\u6beb\u65e0\u6240\u83b7\uff0c\u4e8e\u662f\u65ad\u5b9a\u662f\u4e00\u4e2a\u53ef\u52a0\u8f7d\u6a21\u5757\u4ea7\u751f\u4e86oops\u3002\u6b64\u65f6klogd\u5c31\u4f1a\u5411\u5185\u6838\u67e5\u8be2\u8be5\u53ef\u52a0\u8f7d\u6a21\u5757\u8f93\u51fa\u7684\u7b26\u53f7\u3002\u5373\u4f7f\u8be5\u6a21\u5757\u7684\u7f16\u5236\u8005\u6ca1\u6709\u8f93\u51fa\u5176\u7b26\u53f7\uff0cklogd\u4e5f\u8d77\u7801\u4f1a\u77e5\u9053\u662f\u54ea\u4e2a\u6a21\u5757\u4ea7\u751f\u4e86oops\uff0c\u8fd9\u603b\u6bd4\u5bf9\u4e00\u4e2aoops\u4e00\u65e0\u6240\u77e5\u8981\u597d\u3002
\n\u8fd8\u6709\u5176\u5b83\u7684\u8f6f\u4ef6\u4f1a\u4f7f\u7528System.map\uff0c\u6211\u5c06\u5728\u540e\u9762\u4f5c\u4e00\u8bf4\u660e\u3002<\/p>\nSystem.map\u5e94\u8be5\u4f4d\u4e8e\u4ec0\u4e48\u5730\u65b9?<\/strong><\/span><\/div>\nSystem.map\u5e94\u8be5\u4f4d\u4e8e\u4f7f\u7528\u5b83\u7684\u8f6f\u4ef6\u80fd\u591f\u5bfb\u627e\u5230\u7684\u5730\u65b9\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0cklogd\u4f1a\u5728\u4ec0\u4e48\u5730\u65b9\u5bfb\u627e\u5b83\u3002\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\uff0c\u5982\u679c\u6ca1\u6709\u4ee5\u4e00\u4e2a\u53c2\u6570\u7684\u5f62\u5f0f\u4e3aklogd\u7ed9\u51faSystem.map\u7684\u4f4d\u7f6e\uff0c\u5219klogd\u5c06\u4f1a\u5728\u4e09\u4e2a\u5730\u65b9\u641c\u5bfbSystem.map\u3002\u4f9d\u6b21\u4e3a\uff1a<\/p>\n
\n
- \/boot\/System.map<\/li>\n
- \/System.map<\/li>\n
- \/usr\/src\/linux\/System.map<\/li>\n<\/ol>\n
System.map \u540c\u6837\u4e5f\u542b\u6709\u7248\u672c\u4fe1\u606f\uff0c\u5e76\u4e14klogd\u80fd\u591f\u667a\u80fd\u5316\u5730\u641c\u7d22\u6b63\u786e\u7684map\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u5047\u8bbe\u4f60\u6b63\u5728\u8fd0\u884c\u5185\u68382.4.18\u5e76\u4e14\u76f8\u5e94\u7684map\u6587\u4ef6\u4f4d\u4e8e\/boot\/System.map\u3002\u73b0\u5728\u4f60\u5728\u76ee\u5f55\/usr\/src\/linux\u4e2d\u7f16\u8bd1\u4e00\u4e2a\u65b0\u5185\u68382.5.1\u3002\u5728\u7f16\u8bd1\u671f\u95f4\uff0c\u6587\u4ef6 \/usr\/src\/linux\/System.map\u5c31\u4f1a\u88ab\u521b\u5efa\u3002\u5f53\u4f60\u542f\u52a8\u8be5\u65b0\u5185\u6838\u65f6\uff0cklogd\u5c06\u9996\u5148\u67e5\u8be2 \/boot\/System.map\uff0c\u786e\u8ba4\u5b83\u4e0d\u662f\u542f\u52a8\u5185\u6838\u6b63\u786e\u7684map\u6587\u4ef6\uff0c\u5c31\u4f1a\u67e5\u8be2 \/usr\/src\/linux\/System.map, \u786e\u5b9a\u8be5\u6587\u4ef6\u662f\u542f\u52a8\u5185\u6838\u6b63\u786e\u7684map\u6587\u4ef6\u5e76\u5f00\u59cb\u8bfb\u53d6\u5176\u4e2d\u7684\u7b26\u53f7\u4fe1\u606f\u3002<\/p>\n
\u51e0\u4e2a\u6ce8\u610f\u70b9:<\/p>\n
\n
- \u57282.5.x\u7cfb\u5217\u5185\u6838\u7684\u67d0\u4e2a\u7248\u672c\uff0cLinux\u5185\u6838\u4f1a\u5f00\u59cbuntar\u6210linux-version\uff0c\u800c\u975e\u53ea\u662flinux (\u8bf7\u4e3e\u624b\u8868\u51b3 -- \u6709\u591a\u5c11\u4eba\u4e00\u76f4\u7b49\u5f85\u7740\u8fd9\u6837\u505a?)\u3002\u6211\u4e0d\u77e5\u9053klogd\u662f\u5426\u5df2\u7ecf\u4fee\u6539\u4e3a\u5728\/usr\/src\/linux-version\/System.map\u4e2d\u641c\u7d22\u3002TODO\uff1a\u67e5\u770bklogd\u6e90\u4ee3\u7801\u3002<\/li>\n
- \u5728\u7ebf\u624b\u518c\u4e0a\u5bf9\u6b64\u4e5f\u6ca1\u6709\u5b8c\u6574\u63cf\u8ff0\uff0c\u8bf7\u770b\uff1a
\nstrace -f \/sbin\/klogd | grep 'System.map'
\n31208 open(\"\/boot\/System.map-2.4.18\", O_RDONLY|O_LARGEFILE) = 2\u663e\u7136\uff0c\u4e0d\u4ec5klogd\u5728\u4e09\u4e2a\u641c\u7d22\u76ee\u5f55\u4e2d\u5bfb\u627e\u6b63\u786e\u7248\u672c\u7684map\u6587\u4ef6\uff0cklogd\u4e5f\u540c\u6837\u77e5\u9053\u5bfb\u627e\u540d\u5b57\u4e3a \"System.map\" \u540e\u52a0\"-\u5185\u6838\u7248\u672c\"\uff0c\u8c61 System.map-2.4.18. \u8fd9\u662fklogd\u672a\u516c\u5f00\u7684\u7279\u6027\u3002<\/li>\n<\/ul>\n\u6709\u4e00\u4e9b\u9a71\u52a8\u7a0b\u5e8f\u5c06\u4f7f\u7528System.map\u6765\u89e3\u6790\u7b26\u53f7(\u56e0\u4e3a\u5b83\u4eec\u4e0e\u5185\u6838\u5934\u8fde\u63a5\u800c\u975eglibc\u5e93\u7b49)\uff0c\u5982\u679c\u6ca1\u6709System.map\u6587\u4ef6\uff0c\u5b83\u4eec\u5c06\u4e0d\u80fd\u6b63\u786e\u5730\u5de5\u4f5c\u3002\u8fd9\u4e0e\u4e00\u4e2a\u6a21\u5757\u7531\u4e8e\u5185\u6838\u7248\u672c\u4e0d\u5339\u914d\u800c\u6ca1\u6709\u5f97\u5230\u52a0\u8f7d\u662f\u4e24\u7801\u4e8b\u3002\u6a21\u5757\u52a0\u8f7d\u662f\u4e0e\u5185\u6838\u7248\u672c\u6709\u5173\uff0c\u800c\u4e0e\u5373\u4f7f\u662f\u540c\u4e00\u7248\u672c\u5185\u6838\u5176\u7b26\u53f7\u8868\u4e5f\u4f1a\u53d8\u5316\u7684\u7f16\u8bd1\u540e\u5185\u6838\u65e0\u5173\u3002<\/p>\n
\u8fd8\u6709\u8c01\u4f7f\u7528\u4e86System.map?<\/strong><\/span><\/div>\n\u4e0d\u8981\u8ba4\u4e3aSystem.map\u6587\u4ef6\u4ec5\u5bf9\u5185\u6838oops\u6709\u7528\u3002\u5c3d\u7ba1\u5185\u6838\u672c\u8eab\u5b9e\u9645\u4e0a\u4e0d\u4f7f\u7528System.map\uff0c\u5176\u5b83\u7a0b\u5e8f\uff0c\u8c61klogd\uff0clsof\uff0c
\nsatan# strace lsof 2>&1 1> \/dev\/null | grep System
\nreadlink(\"\/proc\/22711\/fd\/4\", \"\/boot\/System.map-2.4.18\", 4095) = 23<\/p>\nps,
\nsatan# strace ps 2>&1 1> \/dev\/null | grep System
\nopen(\"\/boot\/System.map-2.4.18\", O_RDONLY|O_NONBLOCK|O_NOCTTY) = 6<\/p>\n\u4ee5\u53ca\u5176\u5b83\u8bb8\u591a\u8f6f\u4ef6\uff0c\u8c61dosemu\uff0c\u9700\u8981\u6709\u4e00\u4e2a\u6b63\u786e\u7684System.map\u6587\u4ef6\u3002<\/p>\n
\u5982\u679c\u6211\u6ca1\u6709\u4e00\u4e2a\u597d\u7684System.map\uff0c\u4f1a\u53d1\u751f\u4ec0\u4e48\u95ee\u9898?<\/strong><\/span><\/div>\n\u5047\u8bbe\u4f60\u5728\u540c\u4e00\u53f0\u673a\u5668\u4e0a\u6709\u591a\u4e2a\u5185\u6838\u3002\u5219\u6bcf\u4e2a\u5185\u6838\u90fd\u9700\u8981\u4e00\u4e2a\u72ec\u7acb\u7684 System.map\u6587\u4ef6\uff01\u5982\u679c\u6240\u542f\u52a8\u7684\u5185\u6838\u6ca1\u6709\u5bf9\u5e94\u7684System.map\u6587\u4ef6\uff0c\u90a3\u4e48\u4f60\u5c06\u5b9a\u671f\u5730\u770b\u5230\u8fd9\u6837\u4e00\u6761\u4fe1\u606f\uff1a
\nSystem.map does not match actual kernel (System.map\u4e0e\u5b9e\u9645\u5185\u6838\u4e0d\u5339\u914d)
\n\u4e0d\u662f\u4e00\u4e2a\u81f4\u547d\u9519\u8bef\uff0c\u4f46\u662f\u6bcf\u5f53\u4f60\u6267\u884cps ax\u65f6\u90fd\u4f1a\u607c\u4eba\u5730\u51fa\u73b0\u3002\u6709\u4e9b\u8f6f\u4ef6\uff0c\u6bd4\u5982dosemu\uff0c\u53ef\u80fd\u4e0d\u4f1a\u6b63\u5e38\u5de5\u4f5c\u3002\u6700\u540e\uff0c\u5f53\u51fa\u73b0\u4e00\u4e2a\u5185\u6838oops\u65f6\uff0cklogd\u6216ksymoops\u7684\u8f93\u51fa\u53ef\u80fd\u4f1a\u4e0d\u53ef\u9760\u3002<\/p>\n\u6211\u5982\u4f55\u5bf9\u4e0a\u8ff0\u60c5\u51b5\u8fdb\u884c\u8865\u6551?<\/strong><\/span><\/div>\n\u65b9\u6cd5\u662f\u5c06\u4f60\u6240\u6709\u7684System.map\u6587\u4ef6\u653e\u5728\u76ee\u5f55\/boot\u4e0b\uff0c\u5e76\u4f7f\u7528\u5185\u6838\u7248\u672c\u53f7\u91cd\u65b0\u5bf9\u5b83\u4eec\u8fdb\u884c\u547d\u540d\u3002\u5047\u8bbe\u4f60\u6709\u4ee5\u4e0b\u591a\u4e2a\u5185\u6838\uff1a<\/p>\n
\n
- \/boot\/vmlinuz-2.2.14<\/li>\n
- \/boot\/vmlinuz-2.2.13<\/li>\n<\/ul>\n
\u90a3\u4e48\uff0c\u53ea\u9700\u5bf9\u5e94\u5404\u5185\u6838\u7248\u672c\u5bf9map\u6587\u4ef6\u8fdb\u884c\u6539\u540d\uff0c\u5e76\u653e\u5728\/boot\u4e0b\uff0c\u5982\uff1a<\/p>\n
\/boot\/System.map-2.2.14
\n\/boot\/System.map-2.2.13<\/p>\n\u5982\u679c\u4f60\u6709\u540c\u4e00\u4e2a\u5185\u6838\u7684\u4e24\u4e2a\u62f7\u8d1d\u600e\u4e48\u529e\uff1f\u4f8b\u5982\uff1a<\/p>\n
\n
- \/boot\/vmlinuz-2.2.14<\/li>\n
- \/boot\/vmlinuz-2.2.14.nosound<\/li>\n<\/ul>\n
\u6700\u4f73\u89e3\u51b3\u65b9\u6848\u5c06\u662f\u6240\u6709\u8f6f\u4ef6\u80fd\u591f\u67e5\u627e\u4e0b\u5217\u6587\u4ef6\uff1a<\/p>\n
\/boot\/System.map-2.2.14
\n\/boot\/System.map-2.2.14.nosound<\/p>\n\u4f46\u662f\u8bf4\u5b9e\u5728\u7684\uff0c\u6211\u5e76\u4e0d\u77e5\u9053\u8fd9\u662f\u5426\u662f\u6700\u4f73\u60c5\u51b5\u3002\u6211\u66fe\u7ecf\u89c1\u5230\u641c\u5bfb\"System.map-kernelversion\"\uff0c\u4f46\u662f\u5bf9\u4e8e\u641c\u7d22\"System.map-kernelversion.othertext\"\u7684\u60c5\u51b5\u5462? \u6211\u4e0d\u592a\u6e05\u695a\u3002\u6b64\u65f6\u6211\u6240\u80fd\u505a\u7684\u5c31\u662f\u5229\u7528\u8fd9\u6837\u4e00\u4e2a\u4e8b\u5b9e\uff1a\/usr\/src\/linux\u662f\u6807\u51c6map\u6587\u4ef6\u7684\u641c\u7d22\u8def\u5f84\uff0c\u6240\u4ee5\u4f60\u7684map\u6587\u4ef6\u5c06\u653e\u5728\uff1a<\/p>\n
\n
- \/boot\/System.map-2.2.14<\/li>\n
- \/usr\/src\/linux\/System.map (\u5bf9\u4e8enosound\u7248\u672c)<\/li>\n<\/ul>\n
\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b26\u53f7\u8fde\u63a5\uff1a<\/p>\n
System.map-2.2.14\r\nSystem.map-2.2.14.sound\r\nSystem.map -> System.map-2.2.14.sound<\/pre>\n","protected":false},"excerpt":{"rendered":"\u6709\u5173System.map\u6587\u4ef6\u7684\u4fe1\u606f\u597d\u8c61\u5f88\u7f3a\u4e4f\u3002\u5176\u5b9e\u5b83\u4e00\u70b9\u4e5f\u4e0d\u795e\u79d8\uff0c\u5e76\u4e14\u5728\u6574\u4e2a\u4e8b\u60c5\u5f53\u4e2d\u5b83\u5e76\u4e0d\u8c61\u770b\u4e0a\u53bb\u90a3\u4e48\u5f97\u91cd\u8981\u3002 […]<\/p>\n","protected":false},"author":1476,"featured_media":136412,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-136406","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/136406","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\/1476"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=136406"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/136406\/revisions"}],"predecessor-version":[{"id":136611,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/136406\/revisions\/136611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/136412"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=136406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=136406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=136406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}