在vmlinux.lds.s中將_stext定義為指向代碼段的首地址,如下所示:
.text :
{
__text = .;
_text = .;
__stext = .;
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
*(.text.*)
*(.fixup)
. = ALIGN(16);
___start___ex_table = .;
*(__ex_table)
___stop___ex_table = .;
. = ALIGN(4);
__etext = .;
}
相應地我們也要在LDF文件中添加相應的內容:
.text
{
INPUT_SECTION_ALIGN(4)
. = (. + 3) / 4 * 4;
__text = .;
_text = .;
__stext = .;
INPUT_SECTIONS($OBJECTS_CORE_A(sdram_bank0) $LIBRARIES_CORE_A(sdram_bank0))
INPUT_SECTIONS($OBJECTS_CORE_A(VDK_ISR_code) $LIBRARIES_CORE_A(VDK_ISR_code))
INPUT_SECTIONS($OBJECTS_CORE_A(program) $LIBRARIES_CORE_A(program))
INPUT_SECTIONS($OBJECTS_CORE_A(noncache_code) $LIBRARIES_CORE_A(noncache_code))
INPUT_SECTIONS($LIBRARIES_CORE_A(.text.*))
INPUT_SECTIONS($LIBRARIES_CORE_A(.fixup))
INPUT_SECTION_ALIGN(16)
. = (. + 15) / 16 * 16;
___start___ex_table = .;
INPUT_SECTIONS($LIBRARIES_CORE_A(__ex_table))
___stop___ex_table = .;
INPUT_SECTION_ALIGN(4)
. = (. + 3) / 4 * 4;
__etext = .;
} > MEM_SDRAM
經過這樣的修改後,原來的sdram段就不需要了。
uclinux-2008R1-RC8(bf561)到VDSP5的移植(62)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(60):current_text_addr
uclinux-2008R1-RC8(bf561)到VDSP5的移植(58)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(57)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(56):__grab_cache_page
uclinux-2008R1-RC8(bf561)到VDSP5的移植(46):raw_rwlock_t