2013年10月3日 星期四

vmlinux.lds.S 相關

vmlinux.lds.S生成的vmlinux.lds是一linker script
而.lds file(linker script)是linker(such as arm-linux-ld)的其一input file
linker主要的input file是object file,加上-T可以額外指定linker script
linker的output file就是bin executable, 再kernel部份是vmlinux, 也就是kernel image

以下是.lds file範例
SECTIONS
{
       . = 0x10000;
       .text : { *(.text) }
       . = 0x8000000;
       .data : { *(.data) }
       .bss : { *(.bss) }
}

其中第一行的 . 代表location counter, 表示以下的.text段會開始0x10000
.text : { *(.text) } 代表此lds file's output的.text段由所有的輸入文件(*'s meaning)      的.text段組成, 且順序為input file的順序
第三行. = 0x8000000表示location換成0x8000000,若不指定的話location counter=0x10000+address length of all input's .text


Reference:
http://blog.csdn.net/innost/article/details/6730660
http://mcuos.com/thread-8170-1-1.html

Related Posts:

  • Cloud Service這學期系上開了很多雲端相關的課程 老實講我覺得有點誇張,就像是在追潮流那樣的猛開 很多課之間都有overlap 也不知道哪一門是最基礎的課,基礎的課應該要有通盤的全局觀來看cloud 有了全局觀後才知道要如何去挑選自己想要的課程 隱隱約約覺得是Cloud Service一個基礎,分成三種cloud service Software as a service - 提供cloud application       &… Read More
  • Time-sharing vs multitaskingTime-sharing是一把一個CPU的時間做細分,來讓多個程式"看起來"同時執行 Multitasking就是"看起來"有很多個程式同時執行 所以time-sharing一定就是multitasking 但Multitasking一定是time-sharing嗎? 如果三個CPU都各只執行一個程式,那這樣是multitasking卻不是time-sharing了 有點像是multitasking是一種結果,而要達到這種結果有許多技術 其中… Read More
  • Allocating and Freeing Page TablesReference : http://www.chudov.com/tmp/LinuxVM/html/understand/node26.html 因為page table的allocation跟free有很大的cost,而且又是很常要執行的操作(process create&delete) 所以Linux kernel使用quicklists來cache住用來當page table的page quicklist包含pgd_quick… Read More
  • 2013政交聯合劍道暑訓要點: 左手手指配力,小指到食指為4321,我小指應該都沒握緊,所以舉劍肘關節都會卡死,舉劍劍掉成水平再揮出就會造成劍尾端一直摩擦手掌,因此常手破 胴的史餔力,直接舉到胸口切落,這練習方式蠻有用的,實戰打擊很有用 二足一刀可以改成溜足,整個腰直接一步霸進去切入 五支kote-men的練習 退擊面有點找回感覺 練習應擊技,打擊者不約束部位的練習,切入後觀察打擊者打啥瞬間身體做反應打對應技 切入後的出端kote,切入後架式破掉的打擊 蔡老師調整的中… Read More
  • ARM Exception Mechanism最近要開始讀ARMv8 spec 想了一下對於做System來說要要讀到哪些重點 歸納如以下 1. States: instruction state, execution state, security state 2. Programming mode, register, datatype 3. Memory & protection 4. Interrrupt & exception vector table (ARM d… Read More

0 意見:

張貼留言