📄 bz2.lst
字号:
GAS LISTING /tmp/ccX62eUi.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 36010000 .text 9 0200C400 9 00000101 9 FB0E0A00 9 01010101 10 $Ltext0: 11 .align 2 12 .ent bz2alloc 13 .type bz2alloc, @function 14 bz2alloc: 15 $LFB2: 16 .file 1 "/mnt/hgfs/boot/booter/source/applications/booter/bz2.c" 1:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** /*********************************************************************
2:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
3:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * Copyright:
4:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * MOTOROLA, INC. All Rights Reserved.
5:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * You are hereby granted a copyright license to use, modify, and
6:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * distribute the SOFTWARE so long as this entire notice is
7:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * retained without alteration in any modified and/or redistributed
8:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * versions, and that such modified versions are clearly identified
9:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * as such. No licenses are granted by implication, estoppel or
10:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * otherwise under any patents or trademarks of Motorola, Inc. This
11:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * software is provided on an "AS IS" basis and without warranty.
12:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
13:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * To the maximum extent permitted by applicable law, MOTOROLA
14:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * DISCLAIMS ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING
15:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
16:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH REGARD TO THE
17:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * SOFTWARE (INCLUDING ANY MODIFIED VERSIONS THEREOF) AND ANY
18:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * ACCOMPANYING WRITTEN MATERIALS.
19:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
20:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * To the maximum extent permitted by applicable law, IN NO EVENT
21:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * SHALL MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING
22:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
23:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY
24:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * LOSS) ARISING OF THE USE OR INABILITY TO USE THE SOFTWARE.
25:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
26:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * Motorola assumes no responsibility for the maintenance and support
27:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * of this software
28:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** ********************************************************************/
29:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
30:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** /*
31:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * File: bz2.c
32:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * Purpose: Data definitions and routines for decompress bz2 files.
33:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
34:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * Notes:
35:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
36:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
37:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * Modifications:
GAS LISTING /tmp/ccX62eUi.s page 2 38:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** * 06-17-99 EJD Use Section Headers rather than Program Headers
39:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** *
40:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** */
41:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
42:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #include "bzlib.h"
43:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #include "bz2.h"
44:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #include "util.h"
45:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #include "mem_mgr.h" 46:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 47:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #define BZ2_INPUT_BUFFER_SIZE 4096
48:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** #define BZ2_OUTPUT_BUFFER_SIZE (10 * 1024 * 1024)
49:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 50:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
51:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** /********************************************************************/
52:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 53:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** BUFFER_INTERFACE bufitf; 54:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 55:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 56:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** /********************************************************************/
57:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 58:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** static 59:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** void* bz2alloc ( void* opaque, int items, int size ) 60:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 17 .loc 1 60 0 18 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 19 .mask 0x00000000,0 20 .fmask 0x00000000,0 21 .set noreorder 22 .set nomacro 23 61:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** return bufitf.alloc(opaque, items * size, NULL); 24 .loc 1 61 0 25 0000 0228A670 mul $5,$5,$6 26 0004 0000023C lui $2,%hi(bufitf+12) 27 0008 0C00598C lw $25,%lo(bufitf+12)($2) 28 000c 08002003 jr $25 29 0010 21300000 move $6,$0 30 31 .set macro 32 .set reorder 33 $LFE2: 34 .end bz2alloc 35 .align 2 36 .ent bz2free 37 .type bz2free, @function 38 bz2free: 39 $LFB3: 62:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** } 63:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 64:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** static 65:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** void bz2free ( void* opaque, void* addr ) 66:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 40 .loc 1 66 0 41 .frame $sp,0,$31 # vars= 0, regs= 0/0, args= 0, gp= 0 42 .mask 0x00000000,0 43 .fmask 0x00000000,0 44 .set noreorderGAS LISTING /tmp/ccX62eUi.s page 3 45 .set nomacro 46 67:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (addr != NULL) bufitf.free (addr); 47 .loc 1 67 0 48 0014 0500A010 beq $5,$0,$L5 49 0018 2120A000 move $4,$5 50 51 001c 0000023C lui $2,%hi(bufitf+16) 52 0020 1000598C lw $25,%lo(bufitf+16)($2) 53 0024 08002003 jr $25 54 0028 00000000 nop 55 56 $L5: 57 002c 0800E003 j $31 58 0030 00000000 nop 59 60 .set macro 61 .set reorder 62 $LFE3: 63 .end bz2free 64 .section .rodata.str1.4,"aMS",@progbits,1 65 .align 2 66 $LC0: 67 0000 0A .ascii "\n" 68 0001 2D2D2D2D .ascii "---------------------------------------------\n\000" 68 2D2D2D2D 68 2D2D2D2D 68 2D2D2D2D 68 2D2D2D2D 69 .align 2 70 $LC1: 71 0030 4465636F .ascii "Decompressing Image: %12s (Format = bz2)\n\000" 71 6D707265 71 7373696E 71 6720496D 71 6167653A 72 005d 000000 .align 2 73 $LC3: 74 0060 0A .ascii "\n" 75 0061 4572726F .ascii "Error Decompressing Image File. \n\000" 75 72204465 75 636F6D70 75 72657373 75 696E6720 76 0083 00 .align 2 77 $LC4: 78 0084 2D2D2D2D .ascii "---------------------------------------------\n\000" 78 2D2D2D2D 78 2D2D2D2D 78 2D2D2D2D 78 2D2D2D2D 79 00b3 00 .align 2 80 $LC2: 81 00b4 0A .ascii "\n" 82 00b5 496D6167 .ascii "Image Decompressed Successfully.\n\000" 82 65204465 82 636F6D70 GAS LISTING /tmp/ccX62eUi.s page 4 82 72657373 82 65642053 83 00d7 00 .text 84 .align 2 85 .globl bz2LoadImage 86 .ent bz2LoadImage 87 .type bz2LoadImage, @function 88 bz2LoadImage: 89 $LFB4: 68:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** } 69:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 70:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 71:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** /********************************************************************/
72:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
73:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** void* bz2LoadImage(DataFunctions dataFunctions, const char* fileName)
74:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** {
90 .loc 1 74 0 91 .frame $sp,88,$31 # vars= 48, regs= 6/0, args= 16, gp= 0 92 .mask 0x801f0000,-4 93 .fmask 0x00000000,0 94 .set noreorder 95 .set nomacro 96 97 0034 A8FFBD27 addiu $sp,$sp,-88 98 $LCFI0: 99 0038 5800A4AF sw $4,88($sp) 75:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** void* entryPoint = (void*) 0; 76:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** void *mem = (void *)0x82000000; 77:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** char *bufin, *bufout;
78:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bz_stream strm; 79:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** int bytesRead, ret; 80:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 81:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** showProgress(0);
100 .loc 1 81 0 101 003c 21200000 move $4,$0 102 .loc 1 74 0 103 0040 5000B4AF sw $20,80($sp) 104 $LCFI1: 105 0044 4C00B3AF sw $19,76($sp) 106 $LCFI2: 107 0048 5400BFAF sw $31,84($sp) 108 $LCFI3: 109 004c 2198E000 move $19,$7 110 0050 4800B2AF sw $18,72($sp) 111 $LCFI4: 112 0054 4400B1AF sw $17,68($sp) 113 $LCFI5: 114 0058 4000B0AF sw $16,64($sp) 115 $LCFI6: 116 .loc 1 74 0 117 005c 5C00A5AF sw $5,92($sp) 118 .loc 1 81 0 119 0060 0000000C jal showProgress 120 0064 6000A6AF sw $6,96($sp) 121 82:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 83:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if(dataFunctions.open(fileName))GAS LISTING /tmp/ccX62eUi.s page 5 122 .loc 1 83 0 123 0068 5800A28F lw $2,88($sp) 124 006c 21206002 move $4,$19 125 .loc 1 75 0 126 .loc 1 83 0 127 0070 09F84000 jal $2 128 0074 21A00000 move $20,$0 129 84:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 85:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // initialize buffer 86:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** GetBufferInterface(&bufitf); 130 .loc 1 86 0 131 .loc 1 83 0 132 0078 0D004014 bne $2,$0,$L22 133 007c 0000043C lui $4,%hi(bufitf) 134 135 $L9: 87:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bufitf.init(mem, 0x02000000); 88:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bufin = (char *)bufitf.alloc(mem, BZ2_INPUT_BUFFER_SIZE, NULL); 89:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (bufin == NULL) 90:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 91:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bufout = (char *)bufitf.alloc(mem, BZ2_OUTPUT_BUFFER_SIZE, NULL); 92:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (bufout == NULL) 93:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 94:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 95:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // check header 96:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bytesRead = dataFunctions.read(bufin, BZ2_INPUT_BUFFER_SIZE);
97:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (bytesRead < 2) 98:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 99:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if ((bufin[0] != 'B') || ((bufin[1] != 'Z'))) 100:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 101:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 102:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // initialize decoder 103:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.bzalloc = bz2alloc; 104:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.bzfree = bz2free; 105:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.opaque = mem; 106:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.next_in = bufin; 107:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.avail_in = bytesRead; 108:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.total_in_lo32 = 0; 109:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.total_in_hi32 = 0; 110:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.next_out = bufout; 111:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.avail_out = BZ2_OUTPUT_BUFFER_SIZE; 112:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.total_out_lo32 = 0; 113:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.total_out_hi32 = 0; 114:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (BZ2_bzDecompressInit ( &strm, 0, 0 ) != BZ_OK) 115:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 116:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 117:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // initialize display 118:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** showProgress(1);
119:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** printf("\n---------------------------------------------\n");
120:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** printf("Decompressing Image: %12s (Format = bz2)\n", fileName);
121:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
122:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** while(1) 123:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 124:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // decode 125:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** ret = BZ2_bzDecompress ( &strm ); 126:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (ret == BZ_OK)GAS LISTING /tmp/ccX62eUi.s page 6 127:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 128:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // update display 129:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** updateProgress(bytesRead); 130:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
131:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // read 132:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** bytesRead = dataFunctions.read(bufin, BZ2_INPUT_BUFFER_SIZE);
133:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** if (bytesRead == 0) 134:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** goto error; 135:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.next_in = bufin; 136:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** strm.avail_in = bytesRead; 137:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** } 138:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** else if (ret == BZ_STREAM_END) 139:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** { 140:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // update display 141:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** updateProgress(bytesRead); 142:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** printf("\nImage Decompressed Successfully.\n"); 143:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 144:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // return entry point 145:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** entryPoint = bufout; 146:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** break; 147:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** }
148:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** else 149:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** {
150:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** // return error 151:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** printf("\nError Decompressing Image File. \n"); 152:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** break; 153:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** }
154:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** } 155:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c ****
156:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** printf("---------------------------------------------\n"); 157:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** }
158:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** 159:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** error: 160:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** dataFunctions.close();
136 .loc 1 160 0 137 0080 5C00A28F lw $2,92($sp) 138 $L25: 139 0084 09F84000 jal $2 140 0088 00000000 nop 141 161:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** return entryPoint;
162:/mnt/hgfs/boot/booter/source/applications/booter/bz2.c **** }
142 .loc 1 162 0 143 008c 21108002 move $2,$20 144 0090 5400BF8F lw $31,84($sp)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -