Kernel Section
Kernel Section Missmatchエラーの原因
チェックアウト時間にエラーが発生しました
MODPOST vmlinux.symvers
WARNING: modpost: vmlinux.o(.text+0xc2d4d0): Section mismatch in reference from the function check_cmdline() to the function .init.text:of_get_flat_dt_root()
The function check_cmdline() references
the function __init of_get_flat_dt_root().
This is often because check_cmdline lacks a __init
annotation or the annotation of of_get_flat_dt_root is wrong.
.init.textセクション(__init
)の関数は一時的に使用され、無効になります.起動時に1回呼び出されます.だから、普通.textセクションの関数はです.Initセクションのコードまたはデータにアクセスすると、ループエラーが発生します.例えば、上記の例では、check_cmdline()
関数は、of_get_flat_dt_root()
インジケータを有する__init
関数を呼び出す.init.テキストセクションに存在する関数.逆にcheck cmdlineは違います.これはcheck cmdline関数が無効な関数を呼び出し、部分的に一致しないためです.その他の質問:
__init section
に登録されている関数がテキストセクションの関数を呼び出すときにエラーが発生した場合、異なるセクション間で関数を呼び出すことはできませんか?注意:
実行可能ファイル形式ELF
UNIXでは、すべてファイルです.一部のファイルは実行可能です.実行可能ファイルを実行可能ファイルと呼びます.私たちが使っているプログラムもこの実行可能なファイルです.
レイアウトとは?
リンクは、同じタイプの部分を異なるオブジェクトからelfに収集します.
Linkers use this information to combine different parts of the program coming from different modules into one executable file or a library, by merging sections of the same type (gluing pages together, if you will).
| https://stackoverflow.com/questions/16812574/elf-files-what-is-a-section-and-why-do-we-need-it
A section is the smallest unit of an object that can be relocated. Use the elfdump command to inspect the components of an object or executable file generated by the assembler.
https://docs.oracle.com/cd/E37838_01/html/E61063/elf-23207.html#:~:text=A%20section%20is%20the%20smallest,Executable%20text
3種類のオブジェクトファイル
section
リンク時間のみ関連segment
運転時のみ関連Elf実行フォーマットの動作原理
Initのほかに、他のパーティション関数を呼び出すことができますか?
簡単な実験をする.
what is vmlinux
https://en.wikipedia.org/wiki/Vmlinux
Is a kernel module elf?
Reference
この問題について(Kernel Section), 我々は、より多くの情報をここで見つけました https://velog.io/@soopsaram/Kernel-Sectionテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol