.section 段

来源:互联网 发布:手机拨号软件 编辑:程序博客网 时间:2024/05/15 02:44

#define printf 0x43e11ad0.section .text   //表明下面全是代码段.global _start_start:push {lr}//printf("bss_start=0x%x, bss_end=0x%x\n", __bss_start__, __bss_end__);//给printf传递3个参数ldr r0, =fmtldr r1, =__bss_start__ldr r2, =__bss_end__mov lr, pc ldr pc, =printfbl clear_bss//清除bss段pop {pc}  //回到ubootclear_bss:ldr r0,  =__bss_start__ldr r1, =ldr r2, =__bss_end__mov r2, #01:cmp r1, r2srtne r2, [r0]addne r0, #4bne 1bmov pc, lr.section .rodata   //表明下面全是只读数据段fmt:.asciz "bss_start=0x%x, bss_end=0x%x\n".section .bss//表明下面全是bss段.word 0x12345678.word 0x87654321

查看可.out文件里程序中的所有标号