{"id":8931,"date":"2024-08-28T21:25:48","date_gmt":"2024-08-28T12:25:48","guid":{"rendered":"http:\/\/hdmr.org\/d\/?p=8931#"},"modified":"2024-08-29T01:18:19","modified_gmt":"2024-08-28T16:18:19","slug":"wp-8931","status":"publish","type":"post","link":"https:\/\/hdmr.org\/d\/wp-8931","title":{"rendered":"\u30aa\u30fc\u30eb0\u306e\u521d\u671f\u5316\u30c7\u30fc\u30bf\u304c\u4f5c\u3089\u308c\u3066\u56f0\u308b"},"content":{"rendered":"<p>\u6700\u8fd1\u3001\u30ea\u30f3\u30ab\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3044\u308d\u3044\u308d\u3044\u3058\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001<\/p>\n<p>\u305d\u306e\u4e2d\u3067\u5c11\u3057\u56f0\u3063\u305f\u3053\u3068\u304c\u3042\u3063\u3066\u3001\u305d\u308c\u306f\u30aa\u30fc\u30eb0\u306e\u521d\u671f\u5024\u3042\u308a\u5909\u6570\u30bb\u30af\u30b7\u30e7\u30f3\u304c\u751f\u6210\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3042\u308b\u3002<\/p>\n<hr>\n<p>\u4e00\u822c\u7684\u306b\u4f7f\u308f\u308c\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u3082\u306e\u304c\u3042\u308b\u3002<\/p>\n<ul>\n<li>.text : \u30de\u30b7\u30f3\u30b3\u30fc\u30c9<\/li>\n<li>.rodata : \u5b9a\u6570<\/li>\n<li>.data : \u521d\u671f\u5316\u30c7\u30fc\u30bf\u306e\u3042\u308b\u5909\u6570<\/li>\n<li>.bss : \u521d\u671f\u50240\u306e\u5909\u6570<\/li>\n<\/ul>\n<p>.text \u3068 .rodata \u306f\u4e0d\u5909\u306a\u306e\u3067\u30de\u30a4\u30b3\u30f3\u3067\u306fROM\u306b\u5272\u308a\u4ed8\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u3066\u3001<\/p>\n<p>.data \u3068 .bss \u306f\u5909\u6570\u306a\u306e\u3067RAM\u306b\u5272\u308a\u4ed8\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u3001<\/p>\n<p>\u305d\u306e\u4e2d\u3067.data\u306f\u8d77\u52d5\u6642\u306b\u521d\u671f\u5316\u30c7\u30fc\u30bf\u3092RAM\u306b\u8ee2\u9001\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u304a\u304a\u3056\u3063\u3071\u306b\u306f\u3053\u3046\u3044\u3046\u7406\u89e3\u3067\u3088\u3044\u3002<\/p>\n<hr>\n<p>\u305f\u3060\u3001\u3044\u308d\u3044\u308d\u306a\u90fd\u5408\u3067\u3053\u308c\u4ee5\u5916\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3082\u3042\u308b\u3002<\/p>\n<p>\u4eca\u56de\u554f\u984c\u3068\u306a\u3063\u305f\u306e\u306f\u30b9\u30bf\u30c3\u30af\u9818\u57df\u306b\u3064\u3044\u3066 .stack \u3068\u3044\u3046\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3092\u4ed8\u3051\u305f\u3082\u306e\u3060\u3063\u305f\u3002<\/p>\n<pre>T_STK __stack[STACK_SIZE] __attribute__((section(\".stack\"),nocommon));<\/pre>\n<p>\u3053\u3093\u306a\u30b3\u30fc\u30c9\u304c\u81ea\u52d5\u751f\u6210\u3055\u308c\u3066\u3044\u305f\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a .stack\u30bb\u30af\u30b7\u30e7\u30f3\u306b__stack[]\u3068\u3044\u3046\u914d\u5217\u304c\u78ba\u4fdd\u3055\u308c\u308b\u308f\u3051\u3060\u304c\u3001<\/p>\n<p>\u306a\u305c\u304b\u521d\u671f\u50240\u306e\u5909\u6570\u3067\u306f\u306a\u304f\u3001\u30aa\u30fc\u30eb0\u306e\u521d\u671f\u5316\u30c7\u30fc\u30bf\u306e\u3042\u308b\u5909\u6570\u3068\u3044\u3046\u6271\u3044\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002<\/p>\n<hr>\n<p>\u3088\u304f\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3044\u308d\u3044\u308d\u5b9f\u9a13\u3057\u3066\u307f\u305f\u306e\u3060\u304c\u3001<\/p>\n<p>attribute\u3067\u6307\u5b9a\u3057\u3066\u3044\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3092 .bss.stack \u3068\u3057\u305f\u3089\u3001\u521d\u671f\u50240\u306e\u5909\u6570\u3068\u3057\u3066\u6271\u308f\u308c\u308b\u3053\u3068\u304c\u308f\u304b\u3063\u305f\u3002<\/p>\n<p>\u81ea\u5206\u3067\u6307\u5b9a\u3059\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u304c.bss\u304b\u3089\u59cb\u307e\u308b\u3068\u3001.bss\u540c\u69d8\u306e\u6271\u3044\u306b\u306a\u308b\u304c\u3001<\/p>\n<p>\u305d\u308c\u4ee5\u5916\u306e\u540d\u524d\u3092\u6307\u5b9a\u3059\u308b\u3068\u5909\u6570\u306e\u5834\u5408\u306f .data\u30bb\u30af\u30b7\u30e7\u30f3\u540c\u69d8\u306e\u6271\u3044\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3068\u3002<\/p>\n<p>\u3069\u3046\u3082\u305d\u3046\u3044\u3046\u3053\u3068\u3089\u3057\u3044\u3002<\/p>\n<hr>\n<p>\u30b3\u30f3\u30d1\u30a4\u30e9(gcc)\u3067\u751f\u6210\u3055\u308c\u305f\u30aa\u30d7\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u89e3\u6790\u7d50\u679c\u304b\u3089\u3059\u308b\u3068\u3001<\/p>\n<p>\u4e0a\u8a18\u306e\u5dee\u7570\u306fgcc\u3067\u767a\u751f\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u306e\u3060\u304c\u3001\u5bfe\u7b56\u306f\u30ea\u30f3\u30ab\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u884c\u3046\u3002<\/p>\n<pre>.stack (NOLOAD) :{<br>&nbsp;&nbsp; *(.stack*)\n} &gt; RAM_WORK<\/pre>\n<p>.stack\u30bb\u30af\u30b7\u30e7\u30f3\u3092RAM\u306b\u5272\u308a\u4ed8\u3051\u308b\u3068\u304d\u306bNOLOAD\u3068\u6307\u5b9a\u3059\u308b\u3068\u3001<\/p>\n<p>\u521d\u671f\u5316\u30c7\u30fc\u30bf\u3092\u8ee2\u9001\u3059\u308b\u51e6\u7406\u304c\u3044\u3089\u306a\u3044\u3068\u3044\u3046\u610f\u5473\u306b\u306a\u308b\u3089\u3057\u3044\u3002<\/p>\n<hr>\n<p>\u7279\u5225\u306a\u4e8b\u60c5\u304c\u306a\u3051\u308c\u3070\u5192\u982d\u306b\u66f8\u3044\u305f\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3092\u4f7f\u3046\u3068\u3088\u304f\u3066\u3001<\/p>\n<p>\u30a8\u30f3\u30c8\u30ea\u30dd\u30a4\u30f3\u30c8\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3068\u3057\u3066 .text.startup \u3092\u6307\u5b9a\u3057\u3066\u3001<\/p>\n<p>.text.startup\u30bb\u30af\u30b7\u30e7\u30f3\u3092ROM\u5148\u982d\u306b\u5272\u308a\u4ed8\u3051\u308b\u3068\u3044\u3046\u4f7f\u3044\u65b9\u304c\u3042\u3063\u305f\u3002<\/p>\n<p>\u3053\u3046\u3044\u3046\u3084\u308a\u65b9\u306b\u3057\u305f\u65b9\u304c\u3044\u308d\u3044\u308d\u306a\u554f\u984c\u3092\u56de\u907f\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u601d\u3048\u308b\u3002<\/p>\n<p>.bss.stack\u30bb\u30af\u30b7\u30e7\u30f3\u306a\u3089\u3070\u4eca\u56de\u306e\u554f\u984c\u306f\u767a\u751f\u3057\u306a\u304b\u3063\u305f\u308f\u3051\u3060\u3057\u306d\u3002<\/p>\n<hr>\n<p><font style=\"background-color: rgb(255, 255, 255);\"><\/font><\/p>\n<p>\u3068\u306f\u3044\u3048\u3001\u6700\u7d42\u7684\u306b\u306f\u30ea\u30f3\u30ab\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306a\u3093\u3068\u3067\u3082\u3068\u3044\u3046\u8a71\u306e\u3088\u3046\u3060\u3002<\/p>\n<p>\u6700\u521d\u306f\u30b3\u30f3\u30d1\u30a4\u30e9\u5074\u3067\u3069\u3046\u306b\u304b\u3059\u308b\u306e\u304b\u3068\u601d\u3063\u305f\u306e\u3060\u304c\u3001<\/p>\n<p>\u30ea\u30f3\u30ab\u5074\u3067\u5bfe\u5fdc\u3059\u308b\u3079\u304d\u3053\u3068\u3067\u3042\u308b\u3068\u6c17\u3065\u304f\u307e\u3067\u306b\u6642\u9593\u3092\u8981\u3057\u3066\u3057\u307e\u3063\u305f\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306b\u4ed8\u5c5e\u3057\u3066\u3044\u305f\u30ea\u30f3\u30ab\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3053\u306e\u3042\u305f\u308a\u5bfe\u7b56\u3055\u308c\u3066\u306a\u304f\u3066\u3001<\/p>\n<p>\u30aa\u30fc\u30eb0\u306e\u521d\u671f\u5316\u30c7\u30fc\u30bf\u304c\u5927\u91cf\u767a\u751f\u3057\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u30b5\u30f3\u30d7\u30eb\u66f8\u3044\u305f\u4eba\u306f\u304a\u304b\u3057\u3044\u3068\u601d\u308f\u306a\u304b\u3063\u305f\u306e\u3060\u308d\u3046\u304b?<\/p>\n<p>\u52d5\u304f\u3068\u3044\u3046\u70b9\u3067\u306f\u5f53\u7136\u554f\u984c\u306a\u3044\u306e\u3060\u3051\u3069\u2026\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u3001\u30ea\u30f3\u30ab\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u3044\u308d\u3044\u308d\u3044\u3058\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001 \u305d\u306e\u4e2d\u3067\u5c11\u3057\u56f0\u3063\u305f\u3053\u3068\u304c\u3042\u3063\u3066\u3001\u305d\u308c\u306f\u30aa\u30fc\u30eb0\u306e\u521d\u671f\u5024\u3042\u308a\u5909\u6570\u30bb\u30af\u30b7\u30e7\u30f3\u304c\u751f\u6210\u3055\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u3067\u3042\u308b\u3002 \u4e00\u822c\u7684\u306b\u4f7f\u308f\u308c\u308b\u30bb\u30af\u30b7\u30e7\u30f3\u540d\u3068\u3057\u3066\u306f\u4e0b\u8a18\u306e\u3082\u306e\u304c\u3042\u308b\u3002 .te [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-8931","post","type-post","status-publish","format-standard","hentry","category-computer"],"_links":{"self":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/8931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8931"}],"version-history":[{"count":2,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/8931\/revisions"}],"predecessor-version":[{"id":8933,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=\/wp\/v2\/posts\/8931\/revisions\/8933"}],"wp:attachment":[{"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hdmr.org\/d\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}