歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

uclinux-2008R1-RC8(bf561)到VDSP5的移植(6):__bss_start

添加完head.s後有幾個鏈接錯誤:

[Error li1021] The following symbols referenced in processor 'p0' could not be resolved:
'__bss_start [___bss_start]' referenced from 'corea.dlb[head.doj]'
'__bss_stop [___bss_stop]' referenced from 'corea.dlb[head.doj]'

其中__bss_start和__bss_stop在vmlinus.lds中定義:

.bss :
{
. = ALIGN(4);
___bss_start = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
___bss_stop = .;
__end = .;
}

它就是一個指向.bss段開頭的整數,我們需要在LDF中修改相應的定義:

bsz_sdram ZERO_INIT
{
INPUT_SECTION_ALIGN(4)
. = (. + 3) / 4 * 4;
___bss_start = .;
INPUT_SECTIONS($OBJECTS_CORE_A(sdram_bsz) $LIBRARIES_CORE_A(sdram_bsz))
INPUT_SECTIONS($LIBRARIES_CORE_A(.bss .bss.*))
INPUT_SECTIONS($LIBRARIES_CORE_A(COMMON))

INPUT_SECTION_ALIGN(4)
. = (. + 3) / 4 * 4;
___bss_stop = .;
__end = .;
} > MEM_SDRAM

Copyright © Linux教程網 All Rights Reserved