我寫的cortex-A9主板小二進制文件,定義鏈接描述是這樣的:更新鏈接變量--gc截面
SECTIONS
{
.text :
{
__text = . ;
*(.vector)
*(.text)
*(.text.*)
}
.rodata :
{
*(.rodata)
*(.rodata.*)
}
.data : {
__data_start = . ;
*(.data)
*(.data.*)
}
. = ALIGN(4);
__bss_start = . ;
.bss :
{
*(.bss)
*(.bss.*)
*(COMMON)
. = ALIGN(4);
}
__bss_end = .;
. = ALIGN(4);
__heap_start = .;
. = . + 0x1000;
. = ALIGN(4);
__heap_end = .;
_end = . ;
PROVIDE (end = .) ;
}
但似乎後--gc-sections
工作,並刪除未使用的部分,在__heap_start
仍然--gc-sections
前值獲得workked(我打印出來的代碼,並檢查LD標誌):
ARM-Linux的gnueabihf-GCC -mcpu =的Cortex-A7 -msoft浮動-nostdlib 輪候冊, --gc-sections -Wl, - print-gc-sections -Wl,-Ttext,0x04000000 -T csrvisor.ld小號輪候冊,-Map,binary.map
任何人知道如何改變__heap_start
後--gc-sections
刪除未使用的部分,以正確的價值?
我會檢查你的意見,謝謝。 – akewart 2015-03-03 10:19:22