Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: odd behaviour of some programs on i386 cross-built from amd64



At Mon, 27 Apr 2020 21:17:04 -0700, "Greg A. Woods" <woods%planix.ca@localhost> wrote:
Subject: Re: odd behaviour of some programs on i386 cross-built from amd64
>
> One of the kernels seems to be the same too, assuming one takes into
> account the obvious difference in vers.o:
>
>    text    data     bss     dec     hex filename
> 20222422         515508  926144 21664074        14a914a sys/arch/i386/compile/MONOLITHIC/netbsd
> 20222382         515508  926144 21664034        14a9122 /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/MONOLITHIC/netbsd
>
>    text    data     bss     dec     hex filename
>     795       0       0     795     31b sys/arch/i386/compile/MONOLITHIC/vers.o
>     755       0       0     755     2f3 /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/MONOLITHIC/vers.o

Indeed with a direct "cmp" of the .o files in each build, all are
identical except for vers.o and debugsyms.o -- the latter differs only
in one pathname to the compile directory, which is also to be expected
since the path prefixes differ between the two build environments.

Unfortunately this native-built kernel also works identically on the
Soekris hardware (as expected, since there are no difference in the
object code), i.e. causing the same odd behaviour to a few odd binaries.

I guess now I'll have to dig into my local kernel changes to see what
might be incompatible with a 32-bit system.  Maybe I can also try an ARM
build to see if the same problems happen on an RPi or Beaglebone.


> However the other kernel I've tested is somehow not the same:

The differences are few, but inexplicable.  Here are all the object
files which differ in the XEN3PAE_DOMU builds:

/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/arc4.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/arc4.o differ: char 33, line 1
/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/bf_ecb.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/bf_ecb.o differ: char 33, line 1
/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/camellia-api.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/camellia-api.o differ: char 33, line 1
/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/debugsyms.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/debugsyms.o differ: char 180, line 1
/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/quota1_subr.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/quota1_subr.o differ: char 33, line 1
/build/woods/once.local/current-i386-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/vers.o /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/vers.o differ: char 33, line 1

Again debugsyms.o and vers.o differences can be ignored, but the rest
are so far inexplicably different.

All are built from the same source tree, with the same build options.
The only difference is one build host ("future") is amd64 (running under
Xen, also built from the same source tree), and the other ("once") is
running on native i386 hardware (an old Dell PE2650, but running stock
9.0).

(this sdiff output shows best at 132 column width)

sys/arch/i386/compile/XEN3PAE_DOMU/arc4.o:     file format elf3 | /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/


Disassembly of section .text:                                     Disassembly of section .text:

00000000 <arc4_ctxlen>:                                           00000000 <arc4_ctxlen>:
   0:   55                      push   %ebp                     |    0: b8 08 04 00 00          mov    $0x408,%eax
   1:   b8 08 04 00 00          mov    $0x408,%eax              |    5: c3                      ret
   6:   89 e5                   mov    %esp,%ebp                |    6: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
   8:   5d                      pop    %ebp                     |    d: 8d 76 00                lea    0x0(%esi),%esi
   9:   c3                      ret                             <
   a:   8d b6 00 00 00 00       lea    0x0(%esi),%esi           <

00000010 <arc4_setkey>:                                           00000010 <arc4_setkey>:
  10:   55                      push   %ebp                         10: 55                      push   %ebp
  11:   31 c0                   xor    %eax,%eax                    11: 31 c0                   xor    %eax,%eax
  13:   89 e5                   mov    %esp,%ebp                |   13: 57                      push   %edi
  15:   57                      push   %edi                     |   14: 56                      push   %esi
  16:   56                      push   %esi                     |   15: 53                      push   %ebx
  17:   53                      push   %ebx                     |   16: 83 ec 04                sub    $0x4,%esp
  18:   83 ec 08                sub    $0x8,%esp                |   19: 8b 54 24 18             mov    0x18(%esp),%edx
  1b:   8b 55 08                mov    0x8(%ebp),%edx           |   1d: 8b 74 24 1c             mov    0x1c(%esp),%esi
  1e:   8d 72 08                lea    0x8(%edx),%esi           |   21: 8d 7a 08                lea    0x8(%edx),%edi
  21:   c7 02 00 00 00 00       movl   $0x0,(%edx)              |   24: c7 02 00 00 00 00       movl   $0x0,(%edx)
  27:   c7 42 04 00 00 00 00    movl   $0x0,0x4(%edx)           |   2a: c7 42 04 00 00 00 00    movl   $0x0,0x4(%edx)
  2e:   66 90                   xchg   %ax,%ax                  |   31: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  30:   89 04 86                mov    %eax,(%esi,%eax,4)       |   38: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  33:   40                      inc    %eax                     |   3f: 90                      nop
  34:   3d 00 01 00 00          cmp    $0x100,%eax              |   40: 89 04 87                mov    %eax,(%edi,%eax,4)
  39:   75 f5                   jne    30 <arc4_setkey+0x20>    |   43: 40                      inc    %eax
  3b:   8d 82 08 04 00 00       lea    0x408(%edx),%eax         |   44: 3d 00 01 00 00          cmp    $0x100,%eax
  41:   89 f1                   mov    %esi,%ecx                |   49: 75 f5                   jne    40 <arc4_setkey+0x30>
  43:   89 45 f0                mov    %eax,-0x10(%ebp)         |   4b: 8d 82 08 04 00 00       lea    0x408(%edx),%eax
  46:   31 d2                   xor    %edx,%edx                |   51: 89 f9                   mov    %edi,%ecx
  48:   31 c0                   xor    %eax,%eax                |   53: 89 04 24                mov    %eax,(%esp)
  4a:   89 75 ec                mov    %esi,-0x14(%ebp)         |   56: 31 d2                   xor    %edx,%edx
  4d:   8d 76 00                lea    0x0(%esi),%esi           |   58: 31 c0                   xor    %eax,%eax
  50:   8b 7d 0c                mov    0xc(%ebp),%edi           |   5a: 89 74 24 1c             mov    %esi,0x1c(%esp)
  53:   8b 31                   mov    (%ecx),%esi              |   5e: 66 90                   xchg   %ax,%ax
  55:   0f b6 1c 17             movzbl (%edi,%edx,1),%ebx       |   60: 8b 74 24 1c             mov    0x1c(%esp),%esi
  59:   42                      inc    %edx                     |   64: 0f b6 1c 06             movzbl (%esi,%eax,1),%ebx
  5a:   01 f3                   add    %esi,%ebx                |   68: 40                      inc    %eax
  5c:   8b 75 ec                mov    -0x14(%ebp),%esi         |   69: 8b 31                   mov    (%ecx),%esi
  5f:   01 d8                   add    %ebx,%eax                |   6b: 01 f3                   add    %esi,%ebx
  61:   0f b6 c0                movzbl %al,%eax                 |   6d: 8b 31                   mov    (%ecx),%esi
  64:   3b 55 10                cmp    0x10(%ebp),%edx          |   6f: 01 da                   add    %ebx,%edx
  67:   8d 1c 86                lea    (%esi,%eax,4),%ebx       |   71: 0f b6 d2                movzbl %dl,%edx
  6a:   8b 31                   mov    (%ecx),%esi              |   74: 8d 1c 97                lea    (%edi,%edx,4),%ebx
  6c:   8b 3b                   mov    (%ebx),%edi              |   77: 8b 2b                   mov    (%ebx),%ebp
  6e:   89 33                   mov    %esi,(%ebx)              |   79: 3b 44 24 20             cmp    0x20(%esp),%eax
  70:   be 00 00 00 00          mov    $0x0,%esi                |   7d: 89 33                   mov    %esi,(%ebx)
  75:   89 39                   mov    %edi,(%ecx)              |   7f: be 00 00 00 00          mov    $0x0,%esi
  77:   0f 43 d6                cmovae %esi,%edx                |   84: 89 29                   mov    %ebp,(%ecx)
  7a:   83 c1 04                add    $0x4,%ecx                |   86: 0f 43 c6                cmovae %esi,%eax
  7d:   39 4d f0                cmp    %ecx,-0x10(%ebp)         |   89: 83 c1 04                add    $0x4,%ecx
  80:   75 ce                   jne    50 <arc4_setkey+0x40>    |   8c: 39 0c 24                cmp    %ecx,(%esp)
  82:   83 c4 08                add    $0x8,%esp                |   8f: 75 cf                   jne    60 <arc4_setkey+0x50>
  85:   5b                      pop    %ebx                     |   91: 58                      pop    %eax
  86:   5e                      pop    %esi                     |   92: 5b                      pop    %ebx
  87:   5f                      pop    %edi                     |   93: 5e                      pop    %esi
  88:   5d                      pop    %ebp                     |   94: 5f                      pop    %edi
  89:   c3                      ret                             |   95: 5d                      pop    %ebp
  8a:   8d b6 00 00 00 00       lea    0x0(%esi),%esi           |   96: c3                      ret
                                                                |   97: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
00000090 <arc4_encrypt>:                                        |   9e: 66 90                   xchg   %ax,%ax
  90:   55                      push   %ebp                     |
  91:   89 e5                   mov    %esp,%ebp                | 000000a0 <arc4_encrypt>:
  93:   57                      push   %edi                     |   a0: 55                      push   %ebp
  94:   56                      push   %esi                     |   a1: 57                      push   %edi
  95:   53                      push   %ebx                     |   a2: 56                      push   %esi
  96:   83 ec 08                sub    $0x8,%esp                |   a3: 53                      push   %ebx
  99:   8b 45 08                mov    0x8(%ebp),%eax           |   a4: 83 ec 08                sub    $0x8,%esp
  9c:   8b 4d 10                mov    0x10(%ebp),%ecx          |   a7: 8b 44 24 1c             mov    0x1c(%esp),%eax
  9f:   8d 58 08                lea    0x8(%eax),%ebx           |   ab: 8b 5c 24 24             mov    0x24(%esp),%ebx
  a2:   8b 00                   mov    (%eax),%eax              |   af: 8d 70 08                lea    0x8(%eax),%esi
  a4:   89 45 f0                mov    %eax,-0x10(%ebp)         |   b2: 8b 10                   mov    (%eax),%edx
  a7:   8b 45 08                mov    0x8(%ebp),%eax           |   b4: 8b 48 04                mov    0x4(%eax),%ecx
  aa:   8b 50 04                mov    0x4(%eax),%edx           |   b7: 8b 44 24 28             mov    0x28(%esp),%eax
  ad:   8b 45 14                mov    0x14(%ebp),%eax          |   bb: 01 d8                   add    %ebx,%eax
  b0:   01 c8                   add    %ecx,%eax                |   bd: 39 c3                   cmp    %eax,%ebx
  b2:   39 c1                   cmp    %eax,%ecx                |   bf: 89 44 24 04             mov    %eax,0x4(%esp)
  b4:   89 45 ec                mov    %eax,-0x14(%ebp)         |   c3: 74 49                   je     10e <arc4_encrypt+0x6e>
  b7:   74 40                   je     f9 <arc4_encrypt+0x69>   |   c5: 89 14 24                mov    %edx,(%esp)
  b9:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi    |   c8: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  c0:   8b 45 f0                mov    -0x10(%ebp),%eax         |   cf: 90                      nop
  c3:   41                      inc    %ecx                     |   d0: 8b 04 24                mov    (%esp),%eax
  c4:   40                      inc    %eax                     |   d3: 43                      inc    %ebx
  c5:   0f b6 c0                movzbl %al,%eax                 |   d4: 40                      inc    %eax
  c8:   8d 3c 83                lea    (%ebx,%eax,4),%edi       |   d5: 0f b6 c0                movzbl %al,%eax
  cb:   89 45 f0                mov    %eax,-0x10(%ebp)         |   d8: 8d 3c 86                lea    (%esi,%eax,4),%edi
  ce:   8b 07                   mov    (%edi),%eax              |   db: 8b 17                   mov    (%edi),%edx
  d0:   01 c2                   add    %eax,%edx                |   dd: 89 04 24                mov    %eax,(%esp)
  d2:   0f b6 d2                movzbl %dl,%edx                 |   e0: 01 d1                   add    %edx,%ecx
  d5:   8d 34 93                lea    (%ebx,%edx,4),%esi       |   e2: 0f b6 c9                movzbl %cl,%ecx
  d8:   8b 36                   mov    (%esi),%esi              |   e5: 8d 2c 8e                lea    (%esi,%ecx,4),%ebp
  da:   89 37                   mov    %esi,(%edi)              |   e8: 8b 45 00                mov    0x0(%ebp),%eax
  dc:   8d 3c 93                lea    (%ebx,%edx,4),%edi       |   eb: 89 07                   mov    %eax,(%edi)
  df:   89 07                   mov    %eax,(%edi)              |   ed: 01 d0                   add    %edx,%eax
  e1:   01 f0                   add    %esi,%eax                |   ef: 8b 7c 24 20             mov    0x20(%esp),%edi
  e3:   8b 7d 0c                mov    0xc(%ebp),%edi           |   f3: 89 55 00                mov    %edx,0x0(%ebp)
  e6:   0f b6 c0                movzbl %al,%eax                 |   f6: 0f b6 c0                movzbl %al,%eax
  e9:   8b 04 83                mov    (%ebx,%eax,4),%eax       |   f9: 8b 04 86                mov    (%esi,%eax,4),%eax
  ec:   32 41 ff                xor    -0x1(%ecx),%al           |   fc: 32 43 ff                xor    -0x1(%ebx),%al
  ef:   ff 45 0c                incl   0xc(%ebp)                |   ff: ff 44 24 20             incl   0x20(%esp)
  f2:   39 4d ec                cmp    %ecx,-0x14(%ebp)         |  103: 39 5c 24 04             cmp    %ebx,0x4(%esp)
  f5:   88 07                   mov    %al,(%edi)               |  107: 88 07                   mov    %al,(%edi)
  f7:   75 c7                   jne    c0 <arc4_encrypt+0x30>   |  109: 75 c5                   jne    d0 <arc4_encrypt+0x30>
  f9:   8b 45 08                mov    0x8(%ebp),%eax           |  10b: 8b 14 24                mov    (%esp),%edx
  fc:   8b 5d f0                mov    -0x10(%ebp),%ebx         |  10e: 8b 44 24 1c             mov    0x1c(%esp),%eax
  ff:   89 50 04                mov    %edx,0x4(%eax)           |  112: 89 10                   mov    %edx,(%eax)
 102:   89 18                   mov    %ebx,(%eax)              |  114: 89 48 04                mov    %ecx,0x4(%eax)
 104:   83 c4 08                add    $0x8,%esp                |  117: 83 c4 08                add    $0x8,%esp
 107:   5b                      pop    %ebx                     |  11a: 5b                      pop    %ebx
 108:   5e                      pop    %esi                     |  11b: 5e                      pop    %esi
 109:   5f                      pop    %edi                     |  11c: 5f                      pop    %edi
 10a:   5d                      pop    %ebp                     |  11d: 5d                      pop    %ebp
 10b:   c3                      ret                             |  11e: c3                      ret
 10c:   8d 74 26 00             lea    0x0(%esi,%eiz,1),%esi    |  11f: 90                      nop
                                                                |
00000110 <arc4_stream>:                                         | 00000120 <arc4_stream>:
 110:   55                      push   %ebp                     |  120: 55                      push   %ebp
 111:   89 e5                   mov    %esp,%ebp                |  121: 57                      push   %edi
 113:   57                      push   %edi                     |  122: 56                      push   %esi
 114:   56                      push   %esi                     |  123: 53                      push   %ebx
 115:   53                      push   %ebx                     |  124: 83 ec 08                sub    $0x8,%esp
 116:   83 ec 08                sub    $0x8,%esp                |  127: 8b 44 24 1c             mov    0x1c(%esp),%eax
 119:   8b 45 08                mov    0x8(%ebp),%eax           |  12b: 8b 4c 24 20             mov    0x20(%esp),%ecx
 11c:   8b 4d 0c                mov    0xc(%ebp),%ecx           |  12f: 8d 70 08                lea    0x8(%eax),%esi
 11f:   8d 58 08                lea    0x8(%eax),%ebx           |  132: 8b 10                   mov    (%eax),%edx
 122:   8b 00                   mov    (%eax),%eax              |  134: 8b 58 04                mov    0x4(%eax),%ebx
 124:   89 45 f0                mov    %eax,-0x10(%ebp)         |  137: 8b 44 24 24             mov    0x24(%esp),%eax
 127:   8b 45 08                mov    0x8(%ebp),%eax           |  13b: 01 c8                   add    %ecx,%eax
 12a:   8b 50 04                mov    0x4(%eax),%edx           |  13d: 39 c1                   cmp    %eax,%ecx
 12d:   8b 45 10                mov    0x10(%ebp),%eax          |  13f: 89 44 24 04             mov    %eax,0x4(%esp)
 130:   01 c8                   add    %ecx,%eax                |  143: 74 3f                   je     184 <arc4_stream+0x64>
 132:   39 c1                   cmp    %eax,%ecx                |  145: 89 14 24                mov    %edx,(%esp)
 134:   89 45 ec                mov    %eax,-0x14(%ebp)         |  148: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
 137:   74 38                   je     171 <arc4_stream+0x61>   |  14f: 90                      nop
 139:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi    |  150: 8b 04 24                mov    (%esp),%eax
 140:   8b 45 f0                mov    -0x10(%ebp),%eax         |  153: 41                      inc    %ecx
 143:   41                      inc    %ecx                     |  154: 40                      inc    %eax
 144:   40                      inc    %eax                     |  155: 0f b6 c0                movzbl %al,%eax
 145:   0f b6 c0                movzbl %al,%eax                 |  158: 8d 3c 86                lea    (%esi,%eax,4),%edi
 148:   8d 3c 83                lea    (%ebx,%eax,4),%edi       |  15b: 8b 17                   mov    (%edi),%edx
 14b:   89 45 f0                mov    %eax,-0x10(%ebp)         |  15d: 89 04 24                mov    %eax,(%esp)
 14e:   8b 07                   mov    (%edi),%eax              |  160: 01 d3                   add    %edx,%ebx
 150:   01 c2                   add    %eax,%edx                |  162: 0f b6 db                movzbl %bl,%ebx
 152:   0f b6 d2                movzbl %dl,%edx                 |  165: 8d 2c 9e                lea    (%esi,%ebx,4),%ebp
 155:   8d 34 93                lea    (%ebx,%edx,4),%esi       |  168: 8b 45 00                mov    0x0(%ebp),%eax
 158:   8b 36                   mov    (%esi),%esi              |  16b: 89 07                   mov    %eax,(%edi)
 15a:   89 37                   mov    %esi,(%edi)              |  16d: 01 d0                   add    %edx,%eax
 15c:   8d 3c 93                lea    (%ebx,%edx,4),%edi       |  16f: 89 55 00                mov    %edx,0x0(%ebp)
 15f:   89 07                   mov    %eax,(%edi)              |  172: 0f b6 c0                movzbl %al,%eax
 161:   01 f0                   add    %esi,%eax                |  175: 8b 04 86                mov    (%esi,%eax,4),%eax
 163:   0f b6 c0                movzbl %al,%eax                 |  178: 88 41 ff                mov    %al,-0x1(%ecx)
 166:   8b 04 83                mov    (%ebx,%eax,4),%eax       |  17b: 39 4c 24 04             cmp    %ecx,0x4(%esp)
 169:   88 41 ff                mov    %al,-0x1(%ecx)           |  17f: 75 cf                   jne    150 <arc4_stream+0x30>
 16c:   39 4d ec                cmp    %ecx,-0x14(%ebp)         |  181: 8b 14 24                mov    (%esp),%edx
 16f:   75 cf                   jne    140 <arc4_stream+0x30>   |  184: 8b 44 24 1c             mov    0x1c(%esp),%eax
 171:   8b 45 08                mov    0x8(%ebp),%eax           |  188: 89 10                   mov    %edx,(%eax)
 174:   8b 7d f0                mov    -0x10(%ebp),%edi         |  18a: 89 58 04                mov    %ebx,0x4(%eax)
 177:   89 50 04                mov    %edx,0x4(%eax)           |  18d: 83 c4 08                add    $0x8,%esp
 17a:   89 38                   mov    %edi,(%eax)              |  190: 5b                      pop    %ebx
 17c:   83 c4 08                add    $0x8,%esp                |  191: 5e                      pop    %esi
 17f:   5b                      pop    %ebx                     |  192: 5f                      pop    %edi
 180:   5e                      pop    %esi                     <
 181:   5f                      pop    %edi                     <
 182:   5d                      pop    %ebp                     <
 183:   c3                      ret                             <
 184:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi    <
 18b:   8d 74 26 00             lea    0x0(%esi,%eiz,1),%esi    <
 18f:   90                      nop                             <
                                                                <
00000190 <arc4_decrypt>:                                        <
 190:   55                      push   %ebp                     <
 191:   89 e5                   mov    %esp,%ebp                <
 193:   5d                      pop    %ebp                        193: 5d                      pop    %ebp
 194:   e9 f7 fe ff ff          jmp    90 <arc4_encrypt>        |  194: c3                      ret
                                                                >  195: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
                                                                >  19c: 8d 74 26 00             lea    0x0(%esi,%eiz,1),%esi
                                                                >
                                                                > 000001a0 <arc4_decrypt>:
                                                                >  1a0: e9 fb fe ff ff          jmp    a0 <arc4_encrypt>


Note that even the one that seems to have the same size as one of the
others (from a different kernel, but with otherwise identical build
options) is actually different in the text section:

   text    data     bss     dec     hex filename
    665       0       0     665     299 sys/arch/i386/compile/MONOLITHIC/arc4.o
    665       0       0     665     299 /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/sys/arch/i386/compile/XEN3PAE_DOMU/arc4.o


sys/arch/i386/compile/MONOLITHIC/arc4.o:     file format elf32- | /future/build/woods/future/current-amd64-i386-ppro-obj/usr/src/


Disassembly of section .text:                                     Disassembly of section .text:

00000000 <arc4_ctxlen>:                                           00000000 <arc4_ctxlen>:
   0:   b8 08 04 00 00          mov    $0x408,%eax                   0: b8 08 04 00 00          mov    $0x408,%eax
   5:   c3                      ret                                  5: c3                      ret
   6:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi         6: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
   d:   8d 76 00                lea    0x0(%esi),%esi                d: 8d 76 00                lea    0x0(%esi),%esi

00000010 <arc4_setkey>:                                           00000010 <arc4_setkey>:
  10:   55                      push   %ebp                         10: 55                      push   %ebp
  11:   31 c0                   xor    %eax,%eax                    11: 31 c0                   xor    %eax,%eax
  13:   57                      push   %edi                         13: 57                      push   %edi
  14:   56                      push   %esi                         14: 56                      push   %esi
  15:   53                      push   %ebx                         15: 53                      push   %ebx
  16:   83 ec 04                sub    $0x4,%esp                    16: 83 ec 04                sub    $0x4,%esp
  19:   8b 4c 24 18             mov    0x18(%esp),%ecx          |   19: 8b 54 24 18             mov    0x18(%esp),%edx
  1d:   8b 74 24 1c             mov    0x1c(%esp),%esi              1d: 8b 74 24 1c             mov    0x1c(%esp),%esi
  21:   8d 79 08                lea    0x8(%ecx),%edi           |   21: 8d 7a 08                lea    0x8(%edx),%edi
  24:   c7 01 00 00 00 00       movl   $0x0,(%ecx)              |   24: c7 02 00 00 00 00       movl   $0x0,(%edx)
  2a:   c7 41 04 00 00 00 00    movl   $0x0,0x4(%ecx)           |   2a: c7 42 04 00 00 00 00    movl   $0x0,0x4(%edx)
  31:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi        31: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  38:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi        38: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  3f:   90                      nop                                 3f: 90                      nop
  40:   89 04 87                mov    %eax,(%edi,%eax,4)           40: 89 04 87                mov    %eax,(%edi,%eax,4)
  43:   40                      inc    %eax                         43: 40                      inc    %eax
  44:   3d 00 01 00 00          cmp    $0x100,%eax                  44: 3d 00 01 00 00          cmp    $0x100,%eax
  49:   75 f5                   jne    40 <arc4_setkey+0x30>        49: 75 f5                   jne    40 <arc4_setkey+0x30>
  4b:   8d 81 08 04 00 00       lea    0x408(%ecx),%eax         |   4b: 8d 82 08 04 00 00       lea    0x408(%edx),%eax
  51:   89 fa                   mov    %edi,%edx                |   51: 89 f9                   mov    %edi,%ecx
  53:   89 04 24                mov    %eax,(%esp)                  53: 89 04 24                mov    %eax,(%esp)
  56:   31 c9                   xor    %ecx,%ecx                |   56: 31 d2                   xor    %edx,%edx
  58:   31 c0                   xor    %eax,%eax                    58: 31 c0                   xor    %eax,%eax
  5a:   89 74 24 1c             mov    %esi,0x1c(%esp)              5a: 89 74 24 1c             mov    %esi,0x1c(%esp)
  5e:   66 90                   xchg   %ax,%ax                      5e: 66 90                   xchg   %ax,%ax
  60:   8b 74 24 1c             mov    0x1c(%esp),%esi              60: 8b 74 24 1c             mov    0x1c(%esp),%esi
  64:   0f b6 1c 0e             movzbl (%esi,%ecx,1),%ebx       |   64: 0f b6 1c 06             movzbl (%esi,%eax,1),%ebx
  68:   41                      inc    %ecx                     |   68: 40                      inc    %eax
  69:   8b 32                   mov    (%edx),%esi              |   69: 8b 31                   mov    (%ecx),%esi
  6b:   01 f3                   add    %esi,%ebx                    6b: 01 f3                   add    %esi,%ebx
  6d:   8b 32                   mov    (%edx),%esi              |   6d: 8b 31                   mov    (%ecx),%esi
  6f:   01 d8                   add    %ebx,%eax                |   6f: 01 da                   add    %ebx,%edx
  71:   0f b6 c0                movzbl %al,%eax                 |   71: 0f b6 d2                movzbl %dl,%edx
  74:   8d 1c 87                lea    (%edi,%eax,4),%ebx       |   74: 8d 1c 97                lea    (%edi,%edx,4),%ebx
  77:   8b 2b                   mov    (%ebx),%ebp                  77: 8b 2b                   mov    (%ebx),%ebp
  79:   3b 4c 24 20             cmp    0x20(%esp),%ecx          |   79: 3b 44 24 20             cmp    0x20(%esp),%eax
  7d:   89 33                   mov    %esi,(%ebx)                  7d: 89 33                   mov    %esi,(%ebx)
  7f:   89 2a                   mov    %ebp,(%edx)              |   7f: be 00 00 00 00          mov    $0x0,%esi
  81:   72 02                   jb     85 <arc4_setkey+0x75>    |   84: 89 29                   mov    %ebp,(%ecx)
  83:   31 c9                   xor    %ecx,%ecx                |   86: 0f 43 c6                cmovae %esi,%eax
  85:   83 c2 04                add    $0x4,%edx                |   89: 83 c1 04                add    $0x4,%ecx
  88:   39 14 24                cmp    %edx,(%esp)              |   8c: 39 0c 24                cmp    %ecx,(%esp)
  8b:   75 d3                   jne    60 <arc4_setkey+0x50>    |   8f: 75 cf                   jne    60 <arc4_setkey+0x50>
  8d:   58                      pop    %eax                     |   91: 58                      pop    %eax
  8e:   5b                      pop    %ebx                     |   92: 5b                      pop    %ebx
  8f:   5e                      pop    %esi                     |   93: 5e                      pop    %esi
  90:   5f                      pop    %edi                     |   94: 5f                      pop    %edi
  91:   5d                      pop    %ebp                     |   95: 5d                      pop    %ebp
  92:   c3                      ret                             |   96: c3                      ret
  93:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi    |   97: 8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  9a:   8d b6 00 00 00 00       lea    0x0(%esi),%esi           |   9e: 66 90                   xchg   %ax,%ax


--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpoUJ2VtWrEb.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index