📄 elf.lst
字号:
GAS LISTING /tmp/ccSF7Vky.s page 1 1 .section .mdebug.abi32 2 .previous 3 .section .debug_abbrev,"",@progbits 4 $Ldebug_abbrev0: 5 .section .debug_info,"",@progbits 6 $Ldebug_info0: 7 .section .debug_line,"",@progbits 8 $Ldebug_line0: 9 0000 3C020000 .text 9 0200B900 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .section .rodata.str1.4,"aMS",@progbits,1 12 .align 2 13 $LC0: 14 0000 0A .ascii "\n" 15 0001 20656C66 .ascii " elfRead: buffer address is %x\000" 15 52656164 15 3A206275 15 66666572 15 20616464 16 .align 2 17 $LC2: 18 0020 09627974 .ascii "\tbytesRead is %d \000" 18 65735265 18 61642069 18 73202564 18 2000 19 0032 0000 .align 2 20 $LC1: 21 0034 0973697A .ascii "\tsize is %d \000" 21 65206973 21 20256420 21 00 22 .text 23 .align 2 24 .ent elfRead 25 .type elfRead, @function 26 elfRead: 27 $LFB2: 28 .file 1 "/mnt/hgfs/boot/booter/source/applications/booter/elf.c" 1:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /*********************************************************************
2:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
3:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * Copyright:
4:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * MOTOROLA, INC. All Rights Reserved.
5:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * You are hereby granted a copyright license to use, modify, and
6:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * distribute the SOFTWARE so long as this entire notice is
7:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * retained without alteration in any modified and/or redistributed
8:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * versions, and that such modified versions are clearly identified
9:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * as such. No licenses are granted by implication, estoppel or
10:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * otherwise under any patents or trademarks of Motorola, Inc. This
11:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * software is provided on an "AS IS" basis and without warranty.
12:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
13:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * To the maximum extent permitted by applicable law, MOTOROLA
14:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING
GAS LISTING /tmp/ccSF7Vky.s page 2 15:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
16:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE
17:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY
18:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * ACCOMPANYING WRITTEN MATERIALS.
19:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
20:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * To the maximum extent permitted by applicable law, IN NO EVENT
21:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
22:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
23:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
24:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
25:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
26:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * Motorola assumes no responsibility for the maintenance and support
27:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * of this software
28:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** ********************************************************************/
29:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
30:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /*
31:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * File: elf.c
32:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * Purpose: Data definitions and routines for downloading ELF files.
33:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
34:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * Notes:
35:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
36:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
37:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * Modifications:
38:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** * 06-17-99 EJD Use Section Headers rather than Program Headers
39:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** *
40:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** */
41:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
42:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /*#include "dbug.h"
43:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #include "libdbug.h"*/
44:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #include "elf.h"
45:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #include "example.h"
46:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #include "util.h"
47:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
48:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** DataFunctions fileAccessFunctions;
49:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /********************************************************************/
50:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define MAX_FILENAME 13
51:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
52:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define ET_EXEC 2
53:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define EM_MIPS 8
54:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define EV_CURRENT 1
55:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
56:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_NULL 0
57:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_PROGBITS 1
58:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_SYMTAB 2
59:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_STRTAB 3
60:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_RELA 4
61:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define SHT_NOBITS 8
62:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
63:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define EI_IDENT_PAD_SIZE 9
64:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
65:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define ELF_MAX_HDR 30
66:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
67:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #define DEBUG_MSG 1
68:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef uint32 Elf32_Addr;
69:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef uint32 Elf32_Word;
70:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef uint16 Elf32_Half;
71:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef uint32 Elf32_Off;
GAS LISTING /tmp/ccSF7Vky.s page 3 72:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef int32 Elf32_Sword;
73:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
74:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
75:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
76:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** unsigned char EI_MAG[4];
77:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** uint8 EI_CLASS;
78:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** uint8 EI_DATA;
79:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** uint8 EI_VERSION;
80:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** unsigned char EI_PAD[EI_IDENT_PAD_SIZE];
81:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Ident;
82:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
83:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
84:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
85:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Ident e_ident;
86:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_type;
87:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_machine;
88:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word e_version;
89:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr e_entry;
90:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Off e_phoff;
91:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Off e_shoff;
92:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word e_flags;
93:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_ehsize;
94:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_phentsize;
95:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_phnum;
96:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_shentsize;
97:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_shnum;
98:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half e_shstrndx;
99:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Ehdr;
100:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
101:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
102:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
103:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word p_type;
104:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Off p_offset;
105:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr p_vaddr;
106:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr p_paddr;
107:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word p_filesz;
108:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word p_memsz;
109:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word p_flags;
110:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word p_align;
111:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Phdr;
112:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
113:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
114:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
115:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_name;
116:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_type;
117:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_flags;
118:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr sh_addr;
119:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Off sh_offset;
120:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_size;
121:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_link;
122:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_info;
123:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_addralign;
124:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word sh_entsize;
125:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Shdr;
126:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
127:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
128:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
GAS LISTING /tmp/ccSF7Vky.s page 4 129:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
130:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr r_offset;
131:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word r_info;
132:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Sword r_addend;
133:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Rel;
134:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
135:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** typedef struct
136:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
137:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word st_name;
138:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Addr st_value;
139:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Word st_size;
140:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** unsigned char st_info;
141:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** unsigned char st_other;
142:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** Elf32_Half st_shndx;
143:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** } Elf32_Sym;
144:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
145:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
146:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /********************************************************************/
147:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static volatile int elfBytesRead;
148:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static int symndx, strndx;
149:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static Elf32_Ehdr elfhdr;
150:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static Elf32_Shdr scnhdr[ELF_MAX_HDR];
151:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static uint32 scn_foffset;
152:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static char elfFileName[MAX_FILENAME];
153:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static volatile int progress;
154:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static dots;
155:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static uint32 startadd;
156:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** /********************************************************************/
157:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
158:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** static int
159:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** elfRead (void *buffer, int bytes)
160:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** {
29 .loc 1 160 0 30 .frame $sp,32,$31 # vars= 0, regs= 4/0, args= 16, gp= 0 31 .mask 0x80070000,-4 32 .fmask 0x00000000,0 33 .set noreorder 34 .set nomacro 35 36 0000 E0FFBD27 addiu $sp,$sp,-32 37 $LCFI0: 38 0004 1800B2AF sw $18,24($sp) 39 $LCFI1: 40 0008 1400B1AF sw $17,20($sp) 41 $LCFI2: 42 000c 21908000 move $18,$4 161:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #ifdef DEBUG_MSG
162:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** if(bytes > 1){
43 .loc 1 162 0 44 0010 0200B128 slt $17,$5,2 163:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** printf("\n elfRead: buffer address is %x", buffer);
45 .loc 1 163 0 46 0014 0000043C lui $4,%hi($LC0) 47 .loc 1 160 0 48 0018 1000B0AF sw $16,16($sp) 49 $LCFI3: 50 001c 1C00BFAF sw $31,28($sp)GAS LISTING /tmp/ccSF7Vky.s page 5 51 $LCFI4: 52 .loc 1 160 0 53 0020 2180A000 move $16,$5 54 .loc 1 163 0 55 0024 00008424 addiu $4,$4,%lo($LC0) 56 .loc 1 162 0 57 0028 19002012 beq $17,$0,$L5 58 002c 21284002 move $5,$18 59 164:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** printf("\tsize is %d ", bytes);
165:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
166:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #endif
167:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
168:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** int bytesRead = fileAccessFunctions.read(buffer, bytes);
60 .loc 1 168 0 61 0030 0000033C lui $3,%hi(fileAccessFunctions+8) 62 0034 0800628C lw $2,%lo(fileAccessFunctions+8)($3) 63 0038 21280002 move $5,$16 64 003c 09F84000 jal $2 65 0040 21204002 move $4,$18 66 169:/mnt/hgfs/boot/booter/source/applications/booter/elf.c ****
170:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #ifdef DEBUG_MSG
171:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** if(bytes > 1){
172:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** printf("\tbytesRead is %d ", bytesRead);
67 .loc 1 172 0 68 0044 0000043C lui $4,%hi($LC2) 69 .loc 1 168 0 70 0048 21804000 move $16,$2 71 .loc 1 172 0 72 004c 00008424 addiu $4,$4,%lo($LC2) 73 .loc 1 171 0 74 0050 1F002012 beq $17,$0,$L6 75 0054 21284000 move $5,$2 76 77 $L3: 173:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** }
174:/mnt/hgfs/boot/booter/source/applications/booter/elf.c **** #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -