GCC编译生成bin

#连接
arm-linux-ld -Tboot.lds -o a.out $^

#将elf文件转换为bin
arm-linux-objcopy -O binary -S a.out a.bin



#boot.lds文件

SECTIONS {

    . = 0x30000000;
    .text          :   { *(.text) }
    .rodata ALIGN(4) : {*(.rodata)}
    .data ALIGN(4) : { *(.data) }
    .bss ALIGN(4)  : { *(.bss)  *(COMMON) }
}
posted @ 2013-09-02 16:44  星沉地动  阅读(1502)  评论(0编辑  收藏  举报