imgtools/romtools/rombuild/stubs.lst
changeset 0 044383f39525
equal deleted inserted replaced
-1:000000000000 0:044383f39525
       
     1    1              	@ DLL Stub routines
       
     2    2              	@
       
     3    3              	@ Compile with "gcc -c -Wa,-adhln stubs.s"
       
     4    4              	@
       
     5    5              	.text
       
     6    6              		.code 32
       
     7    7              		.globl  arm4_stub
       
     8    8              	arm4_stub:
       
     9    9 0000 00C09FE5 		ldr     ip, [pc]
       
    10   10 0004 00F09CE5 		ldr     pc, [ip]
       
    11   11 0008 44332211 		.word   0x11223344  @ address in IAT/edata
       
    12   12              	
       
    13   13              		.code 32
       
    14   14              		.globl  armi_stub
       
    15   15              	armi_stub:
       
    16   16 000c 04C09FE5 		ldr     ip, [pc, #4]
       
    17   17 0010 00F09CE5 		ldr     pc, [ip]
       
    18   18 0014 1CFF2FE1 		bx      ip
       
    19   19 0018 44332211 		.word   0x11223344  @ address in IAT/edata
       
    20   20              	
       
    21   21              		.code 16
       
    22   22              		.globl  thumb_stub
       
    23   23              	thumb_stub:
       
    24   24 001c 40B4     		push    {r6}
       
    25   25 001e 024E     		ldr     r6, [pc, #8]
       
    26   26 0020 3668     		ldr     r6, [r6]
       
    27   27 0022 B446     		mov     ip, r6
       
    28   28 0024 40BC     		pop     {r6}
       
    29   29 0026 6047     		bx      ip
       
    30   30 0028 44332211 		.word   0x11223344	@ address in IAT/edata
       
    31   31              	
       
    32   32              		.code 16
       
    33   33              		.globl  thumb_r3unused_stub
       
    34   34              	thumb_r3unused_stub:
       
    35   35 002c 014B     		ldr     r3, [pc, #4]
       
    36   36 002e 1B68     		ldr     r3, [r3]
       
    37   37 0030 1847     		bx      r3
       
    38   38 0032 C046     		nop
       
    39   39 0034 44332211 		.word   0x11223344	@ address in IAT/edata
       
    40   40              	
       
    41   41              	
       
    42   42              	@ In-place rewrites if destination address
       
    43   43              	@ is fixed
       
    44   44              	@
       
    45   45              		.code 32
       
    46   46              		.globl  fast_armi_stub
       
    47   47              	fast_armi_stub:
       
    48   48 0038 04C09FE5 		ldr     ip, [pc, #4]
       
    49   49 003c 1CFF2FE1 		bx      ip
       
    50   50 0040 00000000 		.word   0           @ nop
       
    51   51 0044 53525150 		.word   0x50515253  @ destination address
       
    52   52              	
       
    53   53              		.code 16
       
    54   54              		.globl  fast_thumb_stub
       
    55   55              	fast_thumb_stub:
       
    56   56 0048 40B4     		push    {r6}
       
    57   57 004a 024E     		ldr     r6, [pc, #8]
       
    58   58 004c B446     		mov     ip, r6
       
    59   59 004e 40BC     		pop     {r6}
       
    60   60 0050 6047     		bx      ip
       
    61   61 0052 C046     		nop
       
    62   62 0054 53525150 		.word   0x50515253  @ destination address
       
    63   63              	
       
    64   64              		.code 16
       
    65   65              		.globl  fast_thumb_r3unused_stub
       
    66   66              	fast_thumb_r3unused_stub:
       
    67   67 0058 014B     		ldr     r3, [pc, #4]
       
    68   68 005a 1847     		bx      r3
       
    69   69 005c C046     		nop
       
    70   70 005e C046     		nop
       
    71   71 0060 53525150 		.word   0x50515253  @ destination address
       
    72   72              	
       
    73   73              	
       
    74   74