⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 elf.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 175:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 176:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	elfBytesRead += bytesRead;
  78              		.loc 1 176 0  79 0058 0000033C 		lui	$3,%hi(elfBytesRead)  80 005c 0000628C 		lw	$2,%lo(elfBytesRead)($3) 177:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 178:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	updateProgress(bytesRead);
  81              		.loc 1 178 0  82 0060 21200002 		move	$4,$16  83              		.loc 1 176 0  84 0064 21105000 		addu	$2,$2,$16  85 0068 000062AC 		sw	$2,%lo(elfBytesRead)($3)  86              		.loc 1 178 0  87 006c 0000000C 		jal	updateProgress  88 0070 00000000 		nop  89              	 179:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 180:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	return bytesRead;
 181:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
GAS LISTING /tmp/ccSF7Vky.s 			page 6  90              		.loc 1 181 0  91 0074 21100002 		move	$2,$16  92 0078 1C00BF8F 		lw	$31,28($sp)  93 007c 1800B28F 		lw	$18,24($sp)  94 0080 1400B18F 		lw	$17,20($sp)  95 0084 1000B08F 		lw	$16,16($sp)  96 0088 0800E003 		j	$31  97 008c 2000BD27 		addiu	$sp,$sp,32  98              	  99              	$L5: 100              		.loc 1 163 0 101 0090 0000000C 		jal	printf 102 0094 00000000 		nop 103              	 104              		.loc 1 164 0 105 0098 0000043C 		lui	$4,%hi($LC1) 106 009c 21280002 		move	$5,$16 107 00a0 0000000C 		jal	printf 108 00a4 00008424 		addiu	$4,$4,%lo($LC1) 109              	 110              		.loc 1 168 0 111 00a8 0000033C 		lui	$3,%hi(fileAccessFunctions+8) 112 00ac 0800628C 		lw	$2,%lo(fileAccessFunctions+8)($3) 113 00b0 21280002 		move	$5,$16 114 00b4 09F84000 		jal	$2 115 00b8 21204002 		move	$4,$18 116              	 117              		.loc 1 172 0 118 00bc 0000043C 		lui	$4,%hi($LC2) 119              		.loc 1 168 0 120 00c0 21804000 		move	$16,$2 121              		.loc 1 172 0 122 00c4 00008424 		addiu	$4,$4,%lo($LC2) 123              		.loc 1 171 0 124 00c8 E3FF2016 		bne	$17,$0,$L3 125 00cc 21284000 		move	$5,$2 126              	 127              	$L6: 128              		.loc 1 172 0 129 00d0 0000000C 		jal	printf 130 00d4 00000000 		nop 131              	 132              		.loc 1 176 0 133 00d8 0000033C 		lui	$3,%hi(elfBytesRead) 134 00dc 0000628C 		lw	$2,%lo(elfBytesRead)($3) 135              		.loc 1 178 0 136 00e0 21200002 		move	$4,$16 137              		.loc 1 176 0 138 00e4 21105000 		addu	$2,$2,$16 139 00e8 000062AC 		sw	$2,%lo(elfBytesRead)($3) 140              		.loc 1 178 0 141 00ec 0000000C 		jal	updateProgress 142 00f0 00000000 		nop 143              	 144              		.loc 1 181 0 145 00f4 21100002 		move	$2,$16 146 00f8 1C00BF8F 		lw	$31,28($sp)GAS LISTING /tmp/ccSF7Vky.s 			page 7 147 00fc 1800B28F 		lw	$18,24($sp) 148 0100 1400B18F 		lw	$17,20($sp) 149 0104 1000B08F 		lw	$16,16($sp) 150 0108 0800E003 		j	$31 151 010c 2000BD27 		addiu	$sp,$sp,32 152              	 153              		.set	macro 154              		.set	reorder 155              	$LFE2: 156              		.end	elfRead 157              		.align	2 158              		.ent	elfOpen 159              		.type	elfOpen, @function 160              	elfOpen: 161              	$LFB4: 182:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 183:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static int
 184:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** elfRead2 (void *buffer, int bytes, uint32 offset)
 185:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
 186:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #ifdef DEBUG_MSG
 187:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 		printf("\n elfRead2: buffer address is %x", buffer);
 188:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 		printf(" size is %x ", bytes);
 189:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 		printf(" Flash offset is %x", offset);
 190:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #endif
 191:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 192:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	memCopy((void *)(startadd + offset), buffer, bytes); //src, dest, bytes
 193:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 194:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	elfBytesRead += bytes;
 195:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 196:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	updateProgress(bytes);
 197:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 198:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	return bytes;
 199:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
 200:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 201:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static int
 202:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** elfOpen(const char* fileName)
 203:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
 162              		.loc 1 203 0 163              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 164              		.mask	0x00000000,0 165              		.fmask	0x00000000,0 166              		.set	noreorder 167              		.set	nomacro 168              		 204:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	elfBytesRead = 0;
 205:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	return fileAccessFunctions.open(fileName);
 169              		.loc 1 205 0 170 0110 0000023C 		lui	$2,%hi(fileAccessFunctions) 171 0114 0000598C 		lw	$25,%lo(fileAccessFunctions)($2) 172              		.loc 1 204 0 173 0118 0000033C 		lui	$3,%hi(elfBytesRead) 174 011c 000060AC 		sw	$0,%lo(elfBytesRead)($3) 175              		.loc 1 205 0 176 0120 08002003 		jr	$25 177 0124 00000000 		nop 178              	 179              		.set	macroGAS LISTING /tmp/ccSF7Vky.s 			page 8 180              		.set	reorder 181              	$LFE4: 182              		.end	elfOpen 183              		.align	2 184              		.globl	elfClose 185              		.ent	elfClose 186              		.type	elfClose, @function 187              	elfClose: 188              	$LFB5: 206:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
 207:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 208:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** void elfClose()
 209:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
 189              		.loc 1 209 0 190              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 191              		.mask	0x00000000,0 192              		.fmask	0x00000000,0 193              		.set	noreorder 194              		.set	nomacro 195              		 210:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	fileAccessFunctions.close();
 196              		.loc 1 210 0 197 0128 0000023C 		lui	$2,%hi(fileAccessFunctions+4) 198 012c 0400598C 		lw	$25,%lo(fileAccessFunctions+4)($2) 199 0130 08002003 		jr	$25 200 0134 00000000 		nop 201              	 202              		.set	macro 203              		.set	reorder 204              	$LFE5: 205              		.end	elfClose 206              		.section	.rodata.str1.4 207 0041 000000   		.align	2 208              	$LC3: 209 0044 2073685F 		.ascii	" sh_name:    %08X\n\000" 209      6E616D65  209      3A202020  209      20253038  209      580A00 210 0057 00       		.align	2 211              	$LC4: 212 0058 2073685F 		.ascii	" sh_type:    %08X\n\000" 212      74797065  212      3A202020  212      20253038  212      580A00 213 006b 00       		.align	2 214              	$LC5: 215 006c 2073685F 		.ascii	" sh_flags:   %08X\n\000" 215      666C6167  215      733A2020  215      20253038  215      580A00 216 007f 00       		.align	2 217              	$LC6: 218 0080 2073685F 		.ascii	" sh_addr:    %08X\n\000" 218      61646472 GAS LISTING /tmp/ccSF7Vky.s 			page 9 218      3A202020  218      20253038  218      580A00 219 0093 00       		.align	2 220              	$LC7: 221 0094 2073685F 		.ascii	" sh_offset:  %08X\n\000" 221      6F666673  221      65743A20  221      20253038  221      580A00 222 00a7 00       		.align	2 223              	$LC8: 224 00a8 2073685F 		.ascii	" sh_size:    %08X\n\000" 224      73697A65  224      3A202020  224      20253038  224      580A00 225 00bb 00       		.align	2 226              	$LC9: 227 00bc 2073685F 		.ascii	" sh_link:    %08X\n\000" 227      6C696E6B  227      3A202020  227      20253038  227      580A00 228 00cf 00       		.align	2 229              	$LC10: 230 00d0 2073685F 		.ascii	" sh_info:    %08X\n\000" 230      696E666F  230      3A202020  230      20253038  230      580A00 231 00e3 00       		.align	2 232              	$LC11: 233 00e4 2073685F 		.ascii	" sh_addalgn: %08X\n\000" 233      61646461  233      6C676E3A  233      20253038  233      580A00 234 00f7 00       		.align	2 235              	$LC12: 236 00f8 2073685F 		.ascii	" sh_entsize: %08X\n\000" 236      656E7473  236      697A653A  236      20253038  236      580A00 237              		.text 238              		.align	2 239              		.globl	displaySectionHeader 240              		.ent	displaySectionHeader 241              		.type	displaySectionHeader, @function 242              	displaySectionHeader: 243              	$LFB7: 211:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
 212:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 213:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /********************************************************************/
 214:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static int
 215:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** elfReadSectionData()
GAS LISTING /tmp/ccSF7Vky.s 			page 10 216:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
 217:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	char ch;
 218:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	char* address;
 219:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	int i;
 220:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	// get the start address
 221:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	startadd = stringToInt(elfFileName);
 222:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 223:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	for(i = 0; i < elfhdr.e_shnum; ++i)
 224:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	{
 225:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 		while(elfBytesRead < scnhdr[i].sh_offset)		//seek to beginning of section
 226:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 			elfRead(&ch, 1);
 227:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 
 228:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 	   	switch (scnhdr[i].sh_type)
 229:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 		{
 230:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 			case SHT_NULL:
 231:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 				break;
 232:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 			case SHT_PROGBITS:
 233:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 				address = (char *)scnhdr[i].sh_addr;
 234:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** 				if (address && scnhdr[i].sh_size)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -