歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> uclinux-2008R1-RC8(bf561)到VDSP5的移植(17):.l1.text

uclinux-2008R1-RC8(bf561)到VDSP5的移植(17):.l1.text

日期:2017/3/3 16:43:42   编辑:關於Linux

經過前面的處理後,VDSP報告鏈接的一個警告:

[Warning li2060] The following input section(s) that contain program code
and/or data have not been placed into the executable for processor 'p0'
as there are no relevant commands specified in the LDF:

corea.dlb[head.doj](.l1.text)

在vmlinux.lds.s中,.l1.text是放在SDRAM中的,然後用__stext_l1和__etext_l1做了標記,如下所示:

.text_l1 L1_CODE_START : AT(LOADADDR(.init.ramfs) + SIZEOF(.init.ramfs))
{
. = ALIGN(4);
__stext_l1 = .;
LDS_L1_CODE
. = ALIGN(4);
__etext_l1 = .;
}

在系統啟動時,uclinux的初始化代碼將把這一段區間內的代碼復制到L1中運行,但是在我這裡使用了模式1啟動,跳過了這一步驟,因此直接在LDF文件中將.l1.text這個段放在了L1中,如下所示:

L1_code
{
INPUT_SECTION_ALIGN(4)
__stext_l1 = .;
__CORE = 0;
INPUT_SECTIONS($OBJECTS_CORE_A(L1_code) $LIBRARIES_CORE_A(L1_code))

INPUT_SECTIONS($OBJECTS_CORE_A(VDK_ISR_code) $LIBRARIES_CORE_A(VDK_ISR_code))
INPUT_SECTIONS($OBJECTS_CORE_A(cplb) $LIBRARIES_CORE_A(cplb))
INPUT_SECTIONS($OBJECTS_CORE_A(cplb_code) $LIBRARIES_CORE_A(cplb_code))
INPUT_SECTIONS($OBJECTS_CORE_A(noncache_code) $LIBRARIES_CORE_A(noncache_code))
INPUT_SECTIONS($OBJS_LIBS_INTERNAL_CORE_A(program))
INPUT_SECTIONS($OBJS_LIBS_NOT_EXTERNAL_CORE_A(program))
INPUT_SECTIONS($OBJECTS_CORE_A(program) $LIBRARIES_CORE_A(program))

INPUT_SECTIONS($LIBRARIES_CORE_A(.l1.text))

INPUT_SECTION_ALIGN(4)
__etext_l1 = (. + 3) / 4 * 4;

} > MEM_A_L1_CODE

Copyright © Linux教程網 All Rights Reserved