[問題] LDD3 實作 Hello world
各位前輩,小弟最近在研究LDD,所以就打算從LDD3裡面的小範例開始下手
不過在make 的時候確發生了一些Warning,如下:
WARNING: vmlinux(.text+0xc100116f): Section mismatch: reference to
.init.text:start_kernel (between 'is386' and 'check_x87')
WARNING: vmlinux(.text+0xc12208e0): Section mismatch: reference to
.init.text: (between 'rest_init' and 'alloc_node_mem_map')
WARNING: vmlinux(.text+0xc12251f6): Section mismatch: reference to
.init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc1225202): Section mismatch: reference to
.init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc122520e): Section mismatch: reference to
.init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc122521a): Section mismatch: reference to
.init.text: (between 'iret_exc' and '_etext')
WARNING: vmlinux(.text+0xc1220960): Section mismatch: reference to
.init.text:__alloc_bootmem_node (between 'alloc_node_mem_map' and
'zone_wait_table_init')
WARNING: vmlinux(.text+0xc1220a06): Section mismatch: reference to
.init.text:__alloc_bootmem_node (between 'zone_wait_table_init' and
'schedule')
WARNING: vmlinux(.text+0xc10f856a): Section mismatch: reference to
.init.text:__alloc_bootmem (between 'vgacon_startup' and
'vgacon_scrolldelta')
WARNING: vmlinux(.text+0xc1225994): Section mismatch: reference to
.init.text: (between 'iret_exc' and '_etext')
不過同樣的 source code 和Makefile 在另一台電腦 make 起來 結果確不一樣
(不一樣是指,另一台電腦make時,很順利,沒有出現這樣的warning)
於是我就開始尋找原因....不過可能是因為經驗太少了,找不到Orz...
以下是我要寫 Hello world 時的情形:
1.首先,先去 http://www.kernel.org/ 下載 較新的 kernrl
2.然後重新 build 了一個新的 kernel
3.然後照 LDD3所寫的,將source code 和 Makefile 寫上
我用 goole 找了相關的問題,結果有找到以下回應...
The above warnings happens because during final link we stuff
a lot of different sections down in a smaller number of sections.
So modpost does not know that the references are actually OK.
The fix is simply to avoid doing section mismatch check on vmlinux
when processing the modules
但....我還是不知道要怎麼讓這個 worning fix 掉.....希望各位前輩可以
提供給我一點意見.....
感謝^^
PS: 我猜...應該是我在build新kernel時,沒有注意到什麼事...所以導致了這種結果
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 123.192.32.38
LinuxDev 近期熱門文章
PTT數位生活區 即時熱門文章