{"id":4576,"date":"2019-08-16T23:43:31","date_gmt":"2019-08-16T15:43:31","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4576"},"modified":"2019-08-16T23:43:33","modified_gmt":"2019-08-16T15:43:33","slug":"ld","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/ld","title":{"rendered":"ld\u547d\u4ee4 – GUN\u8fde\u63a5\u5668"},"content":{"rendered":"\n

ld\u547d\u4ee4\u662fGNU\u7684\u8fde\u63a5\u5668\uff0c\u5c06\u76ee\u6807\u6587\u4ef6\u8fde\u63a5\u4e3a\u53ef\u6267\u884c\u7a0b\u5e8f\u3002 <\/p>\n\n\n\n

\u5f88\u5c11\u5355\u72ec\u4f7f\u7528ld\u547d\u4ee4\u5bf9\u76ee\u6807\u8fdb\u884c\u8fde\u63a5\u64cd\u4f5c\uff0c\u901a\u5e38\u90fd\u662f\u4f7f\u7528gcc\u547d\u4ee4\u5728\u7f16\u8bd1\u540e\u81ea\u52a8\u8fdb\u884c\u8fde\u63a5\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f:<\/strong> ld [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-o<\/td>\u6307\u5b9a\u8f93\u51fa\u6587\u4ef6\u540d<\/td><\/tr>
-e<\/td>\u6307\u5b9a\u7a0b\u5e8f\u7684\u5165\u53e3\u7b26\u53f7<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5c06\u6587\u4ef6\u201c\/lib\/linuxcool_1.o\u201d\u4e0e\u201c linuxcool_2 .o\u201d\u548c\u5e93\u201clinuxcool_3.a\u201d\u94fe\u63a5\u8d77\u6765\uff0c\u751f\u6210\u4e00\u4e2a\u540d\u4e3a linuxcool_4\u7684\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u5c06\u6765\u81ea\u6807\u51c6\u641c\u7d22\u76ee\u5f55\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# ld -o linuxcool_4 \/lib\/linuxcool_1.o linuxcool_2 .o -lc<\/pre>\n","protected":false},"excerpt":{"rendered":"

ld\u547d\u4ee4\u662fGNU\u7684\u8fde\u63a5\u5668\uff0c\u5c06\u76ee\u6807\u6587\u4ef6\u8fde\u63a5\u4e3a\u53ef\u6267\u884c\u7a0b\u5e8f\u3002 \u5f88\u5c11\u5355\u72ec\u4f7f\u7528ld\u547d\u4ee4\u5bf9\u76ee\u6807\u8fdb\u884c\u8fde\u63a5\u64cd\u4f5c\uff0c\u901a\u5e38\u90fd\u662f\u4f7f\u7528g […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4576"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4576"}],"version-history":[{"count":4,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4576\/revisions"}],"predecessor-version":[{"id":4640,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4576\/revisions\/4640"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}