ARMリンカの謎のセクション
ARMのリンカスクリプトを見てると.glue_7と.glue_7tというよくわからないセクションがあるけど。調べてもあまり情報がでない。objdumpで見てもmain.oとかスタートアップのオブジェクトファイルにもそんなセクションは見あたらない。
olimexのリンカスクリプトだと
.text : /* collect all sections that should go into FLASH after startup */ { *(.text) /* all .text sections (code) */ *(.rodata) /* all .rodata sections (constants, strings, etc.) */ *(.rodata*) /* all .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* all .glue_7 sections (no idea what these are) */ *(.glue_7t) /* all .glue_7t sections (no idea what these are) */ _etext = .; /* define a global symbol _etext just after the last code byte */ } >flash /* put all the above into FLASH */
となっていて分からないといっている。
生成された.mapのファイルを見る限りだと、.glue_7とglue.7tの領域は0byteになっているのでそこまで考えなくていい。おまじない的な物だと考えた方が良いかもしれない。
むしろそれならリンカスクリプト含めなくてもできるような気がするけど、hermitのリンカスクリプトにもはいってたりするし、書かないとリンカができなくなるのか?