{"id":27239,"date":"2015-02-02T00:09:07","date_gmt":"2015-02-01T15:09:07","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=27239"},"modified":"2015-02-02T00:09:07","modified_gmt":"2015-02-01T15:09:07","slug":"rt0","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/rt0\/","title":{"rendered":"rt0 - \u6975\u5c0f\u30b5\u30a4\u30ba\u306eLinux\u7528C\u30e9\u30f3\u30bf\u30a4\u30e0\u30e9\u30a4\u30d6\u30e9\u30ea"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/02\/IWindow-2.png\" alt=\"Window 2\" title=\"Window-2.png\" border=\"0\" width=\"546\" height=\"296\" \/><\/p>\n<p>Linux\u306ei386 \/ x86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u305f\u6975\u5c0f\u30b5\u30a4\u30ba\u306eC\u30e9\u30f3\u30bf\u30a4\u30e0\u30e9\u30a4\u30d6\u30e9\u30ea\u300c<a href=\"https:\/\/github.com\/lpsantil\/rt0\">rt0<\/a>\u300d\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u540c\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u300187\u884c\u306eC\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3001i386\u5411\u3051\u306e2\u884c\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u30a2\u30bb\u30f3\u30d6\u30e9\u3001x86_64\u5411\u3051\u306e6\u884c\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u30a2\u30bb\u30f3\u30d6\u30e9\u3067\u69cb\u6210\u3055\u308c\u305f\u3068\u3066\u3082\u30b7\u30f3\u30d7\u30eb\u306a\u3082\u306e\u3002\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u6a5f\u80fd\u3082\u3001argc, argv, envp, __environ, _exit\u3068\u3001syscall0\/1\/2\/3\/4\/5\/6(\u5f15\u6570\u306e\u6570\u304c\u7570\u306a\u308b\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u306e\u547c\u3073\u51fa\u3057)\u306b\u9650\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u304a\u304b\u3052\u3067\u751f\u6210\u3055\u308c\u308b\u30d0\u30a4\u30ca\u30ea\u30b5\u30a4\u30ba\u3082\u6975\u5c0f\u30b5\u30a4\u30ba\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u300cHello World!\u300d\u3092\u51fa\u529b\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre><code class=\"c\">#include <rt0\/syscall.h>\n\nint main( int argc, char **argv, char **envp )\n{\n   syscall3( SYS_write, 1, ( long )( \"Hello World!\\n\" ), 13 );\n\n   return 0;\n}\n<\/code><\/pre>\n<p>printf\u306f\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3067\u3001syscall3\u3092\u4f7f\u3063\u3066Linux\u306e\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u300cSYS_write\u300d\u3092\u4f7f\u3063\u3066\u6a19\u6e96\u51fa\u529b\u306b\u300cHello World!\u300d\u3092\u51fa\u529b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u540c\u30b5\u30a4\u30c8\u306b\u306f\u305d\u306e\u4ed6\u306eLinux\u7528\u306e\u5c0f\u3055\u306alibc\u3078\u306e\u30ea\u30f3\u30af\u3082\u96c6\u3081\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u81ea\u529b\u3067C\u30e9\u30f3\u30bf\u30a4\u30e0\u3092\u4f5c\u6210\u3057\u3066\u307f\u308b\u3068\u3001C\u8a00\u8a9e\u306b\u5bfe\u3059\u308b\u7406\u89e3\u304c\u3088\u308a\u6df1\u307e\u308b\u304b\u3082\u3002\u610f\u8b58\u9ad8\u3044\u7cfb\u306e\u958b\u767a\u8005\u306e\u65b9\u306f\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u306ei386 \/ x86_64\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u305f\u6975\u5c0f\u30b5\u30a4\u30ba\u306eC\u30e9\u30f3\u30bf\u30a4\u30e0\u30e9\u30a4\u30d6\u30e9\u30ea\u300crt0\u300d\u304c\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u540c\u30e9\u30f3\u30bf\u30a4\u30e0\u306f\u300187\u884c\u306eC\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3001i386\u5411\u3051\u306e2\u884c\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u30a2\u30bb\u30f3\u30d6\u30e9\u3001x86 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":27238,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[534,1527,2961],"class_list":["post-27239","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-c","tag-library","tag-runtime"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=27239"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27239\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/27238"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=27239"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=27239"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=27239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}