2012年4月25日

程序入口

摘要: 程序入口The first instruction to execute in a program is called the entry point. You can use theENTRY linker script command to set the entry point. The argument is a symbol name:ENTRY(symbol)There are several ways to set the entry point. The linker will set the entry point by tryingeach of the following 阅读全文

posted @ 2012-04-25 13:35 阿加 阅读(219) 评论(0) 推荐(0) 编辑

2012年4月24日

6200 uboot测试版分析(四)

摘要: include/autoconf.mk中COFIG_LOAD_ADDR=0x40008000common/do_boom.c 中潜入了U_BOOT_CMD(bootm,CONFIG_SYS_MAXARGS,1,do_bootm)因此在default_environment中将会找到的bootm最终将执行do_bootm函数,do_bootm调用同文件下的bootm_start函数,在bootm_start函数中将会通过boot_get_kernel获得uImage的头部并且录入images(bootm_headers_t结构体类型)中(此处会将头部搬移,以使得头部信息原地址空间在解压时可以被覆 阅读全文

posted @ 2012-04-24 12:21 阿加 阅读(423) 评论(0) 推荐(0) 编辑

2012年4月23日

xxd

摘要: DESCRIPTIONxxd 建立一个指定文件或者标准输入的十六进制转储,同时也可以把十六进制转储转换成原来的二进制形式。它可以把二进制数据转换ASCII表示形式,而且可以以ASCII的形式显示到标准输出。OPTIONS如果没有给定输入文件,标准输入就作为输入文件infile。如果infile是一个... 阅读全文

posted @ 2012-04-23 13:34 阿加 阅读(7329) 评论(0) 推荐(0) 编辑

Embedded linux primer

摘要: 阅读全文

posted @ 2012-04-23 13:32 阿加 阅读(189) 评论(0) 推荐(0) 编辑

2012年4月18日

612 根目录下vmlinux , compressed下的vmlinux,boot下的Image、zImage

摘要: 根据arch/unicore/kernel下的连接脚本vmlinux.lds以及hend.S等其他文件生成根目录下的vmlinuxELF格式文件。quiet_cmd_vmlinux__ ?= LD $@ cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \ -T $(vmlinux-lds) $(vmlinux-init) \ --start-group $(vmlinux-main) --end-group \ $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-mai 阅读全文

posted @ 2012-04-18 22:25 阿加 阅读(617) 评论(0) 推荐(0) 编辑

gas中嵌入数据.incbin

摘要: .incbin "file"[,skip[,count]] The incbin directive includes file verbatim at the current location. You can controlthe search paths used with the ‘-I’ command-line option . Quotation marks are required around file.The skip argument skips a number of bytes from the start of the file. The cou 阅读全文

posted @ 2012-04-18 13:53 阿加 阅读(673) 评论(0) 推荐(0) 编辑

2012年4月17日

sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \

摘要: %.d: %.c $(CC) -M $(CPPFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$p-162:sed替换命令的格式是‘s///g’如果没有g,则sed的替换操作只对文本中的第一次出现的匹配模式进行替换。关于‘s///’命令的另一个注意点是‘/’分隔符有许多替换选项。如果正在执行字符串替换,并且规则表达式或替换字符串中有许多斜杠,则可以通过在’s’之后指定一个不同的字符来更改分隔符。例如,下列将把所有出现的/usr 阅读全文

posted @ 2012-04-17 16:02 阿加 阅读(5287) 评论(0) 推荐(1) 编辑

2012年4月16日

内嵌汇编

摘要: 参考1、AT&T汇编语言与GCC内嵌汇编简介 2、Professional.Assembly.Language十三章ARM GCC 内嵌(inline)汇编手册内嵌汇编语法如下:__asm__ __volatile__ ( 汇编语句模板: 输出部分: 输入部分: 破坏描述部分 ); 汇编语句模板由汇编语句序列组成,语句之间使用“;”、“\n”或“\n\t”分开。指令中的操作数可以使用占位符引用C语言变量,操作数占位符最多10个,名称如下:%0,%1…,%9。指令中使用占位符表示的操作数,总被视为long型(4个字节),但对其施加的操作根据指令可以是字或者字节,当把操作数当作字或者字节使 阅读全文

posted @ 2012-04-16 14:29 阿加 阅读(5231) 评论(0) 推荐(0) 编辑

2012年4月12日

关于 ld 命令中 -Ttext 参数 的测试

摘要: 文件sramboot.S#include"regdef.h".text.globl mainmain: .set noreorder .set noat la at, value lw a0, 0(at) lw a1, 4(at) jal my_add add a2, a0, a1 sw a2, 8(at)文件#include"regdef.h".text.globl my_add,valuemy_add: .set noreorder add a0,a0,3 j raadd a1,a1,4.datavalue: .word 10, 20, 0Makef 阅读全文

posted @ 2012-04-12 20:25 阿加 阅读(1819) 评论(0) 推荐(0) 编辑

gas 多文件组织

摘要: gas多文件工程摘自:Programming from Groundup Chapter 6主要目的是了解如何组织多文件工程(形式)文件record-def.s:.equ RECORD_FIRSTNAME, 0.equ RECORD_LASTNAME, 40.equ RECORD_ADDRESS, 80.equ RECORD_AGE, 320.equ RECORD_SIZE, 324文件linux.s:#Common Linux Definitions#System Call Numbers.equ SYS_EXIT, 1.equ SYS_READ, 3.equ SYS_WRITE, 4.e. 阅读全文

posted @ 2012-04-12 18:31 阿加 阅读(375) 评论(0) 推荐(0) 编辑

导航