嵌入式开发者社区

标题: 交叉编译器 疑问 [打印本页]

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具' i2 _( Z- b# G7 K- C  N7 {$ u
arago-2011.09-armv5te-linux-gnueabi-sdk
5 A% S4 u/ G6 l+ Qarm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu
! n. c' A3 U* C- I这两个 交叉编译 工具 有什么区别  : N( E% k0 M4 d# s1 v
) K+ {" A) U( q0 h
- v* i* E6 W; ~$ P8 Y

作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好+ [' s1 x5 T! Z/ Q! w7 j9 g$ K
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:03
( [( s  @5 p9 y' Karago 对 TI 的支持应该更好! _$ T3 [2 [/ c+ J5 V
http://arago-project.org/wiki/index.php/Main_Page
9 V! n6 R5 F1 I/ i* I
的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:
6 S" W0 J2 s& ^! v0 e  1 #include<stdio.h>                                                           - a4 G8 G# Y: V. {0 v- |
  2 #include<math.h>" R+ @' L* U4 U8 T+ o5 c8 ]  m! ~
  3 int main(int argc,char* argv[])
/ h' P! O) d8 H2 v, ~, _$ N  4 {
% u* d. W7 I- i  5     int a,b,c;
$ h7 d9 s/ n0 `2 u/ ?4 j% J: |5 W  6     c = a * b;2 Y5 l+ Z/ {/ H+ f
  7     return 0;
$ F, w  C* }9 w& A# o' K: P  8 }
4 a# [7 {" \6 x, h! z
% c( {0 m) g7 O  D9 p4 O3 S下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看$ Y; `! T: f! s& o  O3 E0 f1 ?# H
none:
6 L% z" U0 X2 I1 Y000082e0 <_init>:' Y. F- q+ |6 B, U) r1 ]5 v
    82e0:        e92d4010         push        {r4, lr}, P% E# g, n7 l& j  P' `
    82e4:        eb00001c         bl        835c <call_gmon_start>
# U* z) u5 A7 V* N3 }! q    82e8:        e8bd8010         pop        {r4, pc}8 u9 T" a: b3 L
arago:8 ]# v) c) _; F0 N" X
00008250 <_init>:
3 ~5 s5 }' F+ C, O1 Q, |    8250:        e92d4008         push        {r3, lr}2 H  b7 ?$ F" F* ?1 }
    8254:        eb00001d         bl        82d0 <call_gmon_start>
! @: I7 h9 P% E) Q. N5 ]" ]    8258:        e8bd8008         pop        {r3, pc}
2 U# G+ y$ b; `! H6 w1 W
- {6 Z, U9 I8 N7 nnone:
6 Y0 M6 j; W' s% D4 q( _000082ec <.plt>:# u- t) ~2 L% p2 t
    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
& x7 W! L- e: D9 I% N7 J6 V# f: ]    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>
: H& R" M+ h3 m) v, Z' e, G4 j& W    82f4:        e08fe00e         add        lr, pc, lr5 K% P! j1 n" N# y5 {* Z. h4 J
    82f8:        e5bef008         ldr        pc, [lr, #8]!! }! P( o3 d3 }# D2 l2 n- M
    82fc:        000082d4         .word        0x000082d4
0 C0 ?6 L$ E" A' d& {  @7 ^    8300:        e28fc600         add        ip, pc, #0        ; 0x0' k) J- r1 ]% G
    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000
6 x8 ^! l5 {3 ]# T    8308:        e5bcf2d4         ldr        pc, [ip, #724]!8 ^2 C0 ?1 I* [/ j/ L5 I
    830c:        e28fc600         add        ip, pc, #0        ; 0x0: n& m, a0 ^: G1 U* q, J9 U! ?: t
    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000
& N, q& K; D1 O1 U* i+ d4 h    8314:        e5bcf2cc         ldr        pc, [ip, #716]!3 t$ G' B' i; Z" J: L
    8318:        e28fc600         add        ip, pc, #0        ; 0x0
3 l; J0 ^5 k5 r9 p0 `8 M# @    831c:        e28cca08         add        ip, ip, #32768        ; 0x80006 D: i% Q. m, N; [" E
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!+ O( ~) p" X' U$ c4 B7 o$ t
arago:1 Q4 k' q/ v; ~9 W9 l  {
0000825c <.plt>:
& g2 [  `' O% l% F, ?' }    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)/ }: I  |/ \# }# ^! {/ Z
    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>0 M5 c/ h. x6 b9 r- `
    8264:        e08fe00e         add        lr, pc, lr( `5 T7 u- V9 l
    8268:        e5bef008         ldr        pc, [lr, #8]!( [# h+ @) M+ M5 m* V
    826c:        0000827c         .word        0x0000827c1 U$ V; a2 p* |! H0 ^+ e6 m% ?2 f
    8270:        e28fc600         add        ip, pc, #0( D  K$ [; P: M# E5 y
    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
# D) G( C% h, c- l4 _9 ~    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c
" K4 t4 B4 G7 z2 R2 ^9 Q, T& ?    827c:        e28fc600         add        ip, pc, #0, [9 ~5 a/ {: y6 B; O% {# t3 w* f
    8280:        e28cca08         add        ip, ip, #32768        ; 0x80001 ^# n! _' R- B' `- a" m
    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274
. z- Z+ }! j8 z5 i    8288:        e28fc600         add        ip, pc, #0
) ]3 m9 F( {$ N, h2 K" b    828c:        e28cca08         add        ip, ip, #32768        ; 0x8000
; d0 b8 B+ u6 s2 ~) z9 C8 |    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c
  f# Y, h- C  r& s1 Gnone:
; W* W1 k% C& n, T7 K% u' h00008324 <_start>:
5 M( h# \/ _. a    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>- `: m( s& Q) v% `7 B3 b+ b/ \. e8 D6 r
    8328:        e3a0b000         mov        fp, #0        ; 0x0
% V3 P! a$ M* b, }0 L8 |/ e    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4): F, Q+ P# W" G+ H. [. ^" N2 ^' p7 B
    8330:        e1a0200d         mov        r2, sp; v! _+ z9 ^7 X- `/ P
    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
& q/ K7 `2 ]2 F  B, |* q    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
7 k. k/ E+ h5 `7 _    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>- L+ u+ n6 X( \/ ?& G( V# u" K4 |3 M
    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>
: }% r- j, k1 @% w    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)4 q2 E4 u( K: d6 _. m1 E
    8348:        ebffffef         bl        830c <_init+0x2c>7 u+ k: u6 q$ q2 e8 H
    834c:        ebffffeb         bl        8300 <_init+0x20>1 |# J  q% [2 h* f9 R/ ?5 X: o- F
    8350:        00008404         .word        0x00008404
, v, T0 E6 |# S  }9 I    8354:        000083cc         .word        0x000083cc
* S) G4 y: L( J    8358:        00008408         .word        0x00008408* O) f* a( p0 H4 B- E+ \% A
arago:
9 }' o8 v" N' ~* M0 u- R5 w00008294 <_start>:7 Z6 C& U2 O/ D) g+ N( F: D
    8294:        e3a0b000         mov        fp, #0
8 C/ w7 c; L) I( T/ c, c0 S. |    8298:        e3a0e000         mov        lr, #0
/ v8 C' f5 ~: x( K5 ?, @    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
$ @. z8 D  J' T    82a0:        e1a0200d         mov        r2, sp  L! t  H: p. ?& M, |* D
    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)4 A; p  i1 y8 `+ s( S- G9 f$ m/ k5 e
    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
% ~* V  Q* O' D  F3 f8 k    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>! T+ E. A1 J( }7 Y
    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)6 a! I6 Y8 ]+ l! Q8 ^# K" H
    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>
; `8 k# R) n2 H! m    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>/ h1 G( _. e9 Q# g5 I+ c
    82bc:        ebffffee         bl        827c <_init+0x2c>
- R3 k2 K- d  B9 G3 n    82c0:        ebffffea         bl        8270 <_init+0x20>
" a0 H3 s$ A- J+ s( i0 |    82c4:        000083dc         .word        0x000083dc; S8 I$ e* J' V2 z' J$ H
    82c8:        00008344         .word        0x000083444 s. }+ i8 Y! s% {
    82cc:        0000837c         .word        0x0000837c
6 y6 c( H6 p4 bnone:
* y: S# v8 c6 K! B% z0000835c <call_gmon_start>:% {3 d" L( y3 D: M- o, g  h
    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>* G" i( u3 o# l
    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>/ W/ A0 y2 l) l2 h1 Y) t
    8364:        e08f3003         add        r3, pc, r30 O* \$ a1 A3 Y4 M4 l1 ~9 s
    8368:        e7931002         ldr        r1, [r3, r2]
0 z4 Y) l! |, Q$ h    836c:        e3510000         cmp        r1, #0        ; 0x0
- @# a9 B9 [1 m. D8 h    8370:        012fff1e         bxeq        lr
: p$ d2 s0 c! ~7 B2 m    8374:        eaffffe7         b        8318 <_init+0x38>0 k7 S. P7 ~, s* T0 b9 n+ X  q
    8378:        00008264         .word        0x00008264/ z% o+ A# Z2 w' w: N! N7 \* A
    837c:        00000018         .word        0x00000018
0 w1 g7 |! {* j7 @7 a! w2 harago:" X9 I  d* A* N+ r- D" V& a
000082d0 <call_gmon_start>:% w1 U& d" E3 B/ V% f0 W# Z6 h
    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>, i% _$ t. U" C  e( V
    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>0 L* b7 w1 @6 m( _
    82d8:        e08f3003         add        r3, pc, r3
. N1 O1 v4 O% b) n    82dc:        e7932000         ldr        r2, [r3, r0]6 [, b5 Z) G0 l1 s9 P) W8 n
    82e0:        e3520000         cmp        r2, #0! k3 L! o. }1 u2 R4 `! x+ G6 X& ]
    82e4:        012fff1e         bxeq        lr  T5 Y( g6 R* f; @: ]" l9 t
    82e8:        eaffffe6         b        8288 <_init+0x38>
. i1 @* p& |4 L8 `# w    82ec:        00008208         .word        0x00008208( }) [, b/ T. [+ c; g% f
    82f0:        00000018         .word        0x00000018
+ k1 H# N% n/ d0 z: ^1 }8 Lnone:
0 r1 S9 {# l1 I5 A00008380 <__do_global_dtors_aux>:. d* o( N$ M7 R3 m5 ^, u
    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
2 C. z8 Z+ D# C- ^+ B$ g    8384:        e5d23000         ldrb        r3, [r2]
1 @! r, E0 [8 T, `    8388:        e3530000         cmp        r3, #0        ; 0x0
& R3 y' e) b: f; H/ z' {9 }    838c:        03a03001         moveq        r3, #1        ; 0x1% N( G) X9 b; r  R1 j
    8390:        05c23000         strbeq        r3, [r2]9 h; E; z7 _  I/ e6 }$ E6 A
    8394:        e12fff1e         bx        lr* y: u( Y- Z% Y" w. g
    8398:        000105f4         .word        0x000105f4
- @  k- c, O/ W( Y- Karago:
9 h5 N8 _! k* U4 i2 k( D; `3 v/ y000082f4 <__do_global_dtors_aux>:
9 D7 r5 A3 A- h9 B5 v$ [' w    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>4 e  M3 ?1 o& K; f" S
    82f8:        e5d32000         ldrb        r2, [r3]# k: b; |4 V* K4 A$ B7 e5 N/ j
    82fc:        e3520000         cmp        r2, #0% H$ J) ^7 p0 O3 j! Q- `
    8300:        02822001         addeq        r2, r2, #1/ y8 G' H5 z/ f3 D
    8304:        05c32000         strbeq        r2, [r3]
5 Y6 J' V6 i5 D2 x& e( M. ?. n) l0 [    8308:        e12fff1e         bx        lr* [; P) Z' w8 J, c  G. k
    830c:        0001050c         .word        0x0001050c& V" E4 T3 n# e) [; W
none:3 O* m& g( k# C9 k* P3 a
0000839c <frame_dummy>:# U! f/ J; G# }& G1 K5 g$ `( n$ d
    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>% g1 |# A5 G& X* k" v5 Z
    83a0:        e92d4010         push        {r4, lr}
6 e% Y3 y9 a2 `& E1 f; P) m    83a4:        e5903000         ldr        r3, [r0]
* O7 z( _: S9 b. s5 `) {3 n    83a8:        e3530000         cmp        r3, #0        ; 0x0
3 Q* s! K9 R3 |" d" p8 S' R# j' R    83ac:        08bd8010         popeq        {r4, pc}, ]( Q- U6 `7 {/ S% Y# f
    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>) g+ h) |3 d; @* n! ]& z6 r5 j
    83b4:        e3530000         cmp        r3, #0        ; 0x0
. ^8 o5 V7 |" q& x" `    83b8:        08bd8010         popeq        {r4, pc}. R4 p+ f; |) y+ ~' j
    83bc:        e12fff33         blx        r3
- U* m) f( Z: Z: n    83c0:        e8bd8010         pop        {r4, pc}
, ?3 _+ u& {1 Q% ~$ ?. h; X: U) `    83c4:        000104dc         .word        0x000104dc
5 R! M- M% p0 C4 B4 e# U! h. [  s5 D    83c8:        00000000         .word        0x00000000
. l; p* @) g  u( harago:
( V, ?; l  [( P) A, `9 g00008310 <frame_dummy>:. @/ y4 x' P# A1 B6 k" n5 C
    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>: e$ I0 }( D6 n6 N% c4 g& B' T  D
    8314:        e92d4008         push        {r3, lr}
# O8 `+ a1 C& N  \# u. N) [. e$ S    8318:        e5903000         ldr        r3, [r0]
; M# r0 R# K: t* i) F9 _7 K9 Q    831c:        e3530000         cmp        r3, #0
3 G5 v! i+ z3 n8 @3 {& Y    8320:        0a000003         beq        8334 <frame_dummy+0x24>
; x) k- M& Q2 f, F! }    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>+ J) n& ]: r3 p/ ?- _( {3 j% f$ \
    8328:        e3530000         cmp        r3, #00 l' o9 W* L+ |
    832c:        11a0e00f         movne        lr, pc
' i+ u7 A7 [, X- c- ~* E    8330:        112fff13         bxne        r3% V5 F/ k: O3 T* a2 }
    8334:        e8bd4008         pop        {r3, lr}9 W' P* r( d* m+ m. h; |
    8338:        e12fff1e         bx        lr
4 A5 v4 r4 _  ]6 o    833c:        000103fc         .word        0x000103fc
& N+ |. }8 H) G3 d$ |' M( [    8340:        00000000         .word        0x00000000
9 |- ]/ Y" O6 q% Inone:
* N: p( R/ }8 o# P3 |000083cc <main>:1 Y1 t0 m( s' L1 _# Y
    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)6 @/ |& c4 e6 T$ @5 `# _# ]
    83d0:        e28db000         add        fp, sp, #0        ; 0x0
9 r) K0 C9 ~, n, L0 p4 m$ W    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c6 c9 a% k& D/ L0 ~; F$ l7 c
    83d8:        e50b0018         str        r0, [fp, #-24]
9 a# \- F+ R+ i. w+ u$ \    83dc:        e50b101c         str        r1, [fp, #-28]
9 t- {, w# ~1 _2 `) {6 X    83e0:        e51b2010         ldr        r2, [fp, #-16]
, |! o& ]2 F$ l    83e4:        e51b300c         ldr        r3, [fp, #-12]& w& g3 D- P: I2 d" ?1 h7 J
    83e8:        e0030392         mul        r3, r2, r3
& d. `( D5 P9 {    83ec:        e50b3008         str        r3, [fp, #-8]
" a: r7 {  j* G. E0 _/ o/ M8 T    83f0:        e3a03000         mov        r3, #0        ; 0x0; ~8 K/ U- ^  m, v7 y
    83f4:        e1a00003         mov        r0, r3/ g* D9 q) E3 u" B+ p5 c4 \# {
    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
: g/ [" h  b" x" M    83fc:        e8bd0800         pop        {fp}
" j1 V8 |* L) @6 y    8400:        e12fff1e         bx        lr3 `* ^- o# P, e) `( i- U
arago:
% v- J8 f) g) R# e00008344 <main>:
0 ?0 S" t" s8 q1 J9 j    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
0 O) s% g" E, M2 m6 ^  O    8348:        e28db000         add        fp, sp, #0
% `: l5 z3 g# H3 [, D, L    834c:        e24dd01c         sub        sp, sp, #28/ t3 K0 R0 P8 b9 \
    8350:        e50b0018         str        r0, [fp, #-24]
, M3 V; T$ X8 S1 d, @/ T4 C4 j) _    8354:        e50b101c         str        r1, [fp, #-28]9 v6 F& n  ?! u, ?. ^# U
    8358:        e51b3008         ldr        r3, [fp, #-8]/ O! O2 b$ }* B! v
    835c:        e51b200c         ldr        r2, [fp, #-12]7 ^% K' n# }8 T. N! \0 ^
    8360:        e0030392         mul        r3, r2, r3
# p9 A# n9 p0 K2 {    8364:        e50b3010         str        r3, [fp, #-16]
2 p2 T  a$ ?: e1 P0 ^  N- ~( h    8368:        e3a03000         mov        r3, #0+ U( u" G: B4 t" S
    836c:        e1a00003         mov        r0, r3; h5 k: T6 ]* j0 p( u. v5 I9 |
    8370:        e28bd000         add        sp, fp, #0
  e* ~8 U9 f( Z" T4 O# s, [    8374:        e8bd0800         pop        {fp}4 g/ w% |1 V' Q8 g" D% l  P
    8378:        e12fff1e         bx        lr
. u7 \1 X: o# j+ M6 z. rnone:6 ^4 j# P* h" ^9 o! m5 u' G
00008404 <__libc_csu_fini>:3 T1 G0 e7 R$ L, }
    8404:        e12fff1e         bx        lr
2 H- h1 m" ]' parago:# J! H0 C; ~, T5 l7 I
000083dc <__libc_csu_fini>:8 r$ w# ^0 x8 `+ w2 q( ^8 Z7 Y
    83dc:        e12fff1e         bx        lr: k% Q9 e" r4 j1 c! E  w5 p' s
none:) a' B6 U2 S" {3 S2 L
00008408 <__libc_csu_init>:
# y4 s3 @7 s+ r) z7 o7 L9 y    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}
( R# `) Z2 j2 l  E6 ~4 R- N/ r& J5 g    840c:        e1a08001         mov        r8, r1. [0 M6 y7 U+ Z
    8410:        e1a07002         mov        r7, r2
7 q4 S7 ]( C1 o4 ~7 \' ]    8414:        e1a0a000         mov        sl, r0
! e; d# t1 Y$ F& q, q    8418:        ebffffb0         bl        82e0 <_init>
' k: [) o) C1 D1 s/ f5 ?    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>
* \2 ]% B6 J# B2 x# w4 B    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>
2 b1 {& w  `, q9 D; R* u7 ^$ d    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
7 F$ X. c) O- T! G+ `2 w4 V    8428:        e0613003         rsb        r3, r1, r3
; ^5 F  Q4 V& Y$ a, X0 V2 w* ^    842c:        e08f2002         add        r2, pc, r2
: T5 z! `/ y6 E/ w% V    8430:        e1b05143         asrs        r5, r3, #2! O. [7 ~/ ~6 |) R( O/ ]
    8434:        e0822001         add        r2, r2, r1
! d0 ]" e8 f4 V    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}
7 |( c1 ^+ O% I) f4 @2 Q    843c:        e1a06002         mov        r6, r2/ X$ i; F1 e2 j3 O) b) q
    8440:        e3a04000         mov        r4, #0        ; 0x0( C& _# k  m( w0 O( b1 n
    8444:        e1a0000a         mov        r0, sl
4 E$ c7 I% ^" e    8448:        e1a01008         mov        r1, r8. G& ~: P/ E# _
    844c:        e1a02007         mov        r2, r7
" y7 l4 z( M% X2 w    8450:        e1a0e00f         mov        lr, pc1 [. _( P+ \) D+ n* ^& W7 F
    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]# ^. Q7 C) }$ l: a) P2 L5 s. M: |
    8458:        e2844001         add        r4, r4, #1        ; 0x1! D7 i* U4 F+ m! K' B( H5 O/ P
    845c:        e1540005         cmp        r4, r5# v* \! m& ]% i6 C$ i; F2 M' \) [
    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>
, ~- L2 m1 D2 ]4 S& q    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}
* D; j# {  a# m% v; p* g    8468:        ffffff04         .word        0xffffff04
6 e6 o5 B: M, l6 v9 O    846c:        ffffff08         .word        0xffffff08( Z* ^2 h  F' H/ ?( ]
    8470:        0000819c         .word        0x0000819c, W5 N. f; e. n+ w6 m
arago:
8 g; S% `0 G! ~2 }% B0000837c <__libc_csu_init>:
, I2 V5 p; F7 Z    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}4 w" m/ W6 ?: M8 m/ p6 x5 J( [
    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
9 g$ }* n/ t$ t. X& V( l    8384:        e1a06000         mov        r6, r0
5 L& ^0 N( v" |8 T3 d2 D    8388:        e1a07001         mov        r7, r1
, h5 O% J: m* a+ u    838c:        e1a08002         mov        r8, r2/ @8 Z5 R' M' |( g& f, f
    8390:        ebffffae         bl        8250 <_init>
4 j2 |  H5 Y/ M& U  ~- o    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>
3 q7 s0 n9 H- x/ G! @8 B    8398:        e08fa00a         add        sl, pc, sl
1 P1 y, Z) \7 d. l    839c:        e08f0001         add        r0, pc, r1* n/ L7 t( d* q$ p
    83a0:        e06a5000         rsb        r5, sl, r03 h! D0 F; |, ?% B7 @
    83a4:        e1b05145         asrs        r5, r5, #2: d+ s8 T2 a2 B
    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}; ?: u) q; A3 g
    83ac:        e3a04000         mov        r4, #0
; @5 y8 v2 E" W; b    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]8 _7 e- M  s/ P! ~' ^( j2 p
    83b4:        e1a00006         mov        r0, r68 t+ `4 E& F4 I0 t3 O
    83b8:        e1a01007         mov        r1, r7/ [& @/ \$ Y! O3 Z" n9 u. W
    83bc:        e1a02008         mov        r2, r8
- _* o/ m( a: L4 o$ _    83c0:        e2844001         add        r4, r4, #16 ~# j0 E9 M7 s
    83c4:        e12fff33         blx        r3# m" S+ I$ _9 I, \  }3 x) f
    83c8:        e1540005         cmp        r4, r5
: S) }' J8 \# F9 X* B    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>
  Z! f' S: e) g: p& `9 c1 x/ C$ A    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}) t, C1 Y. g3 O1 a2 g; O0 V
    83d4:        00008054         .word        0x00008054
, H8 y6 o2 J" J  y( p( W- _6 J    83d8:        00008054         .word        0x00008054
6 b- ]. p% B$ A. G! @, Jnone:
6 V" X* x6 X5 t2 S1 ^# X% XDisassembly of section .fini:
9 }8 z: f4 g# A4 U3 g! p4 y
+ _8 \1 j* h8 l3 l$ ]' C00008474 <_fini>:
. S& @# W5 ]/ [8 w- W    8474:        e92d4010         push        {r4, lr}1 M: @" }: k2 z: T: j
    8478:        e8bd8010         pop        {r4, pc}
! D- X: {) _4 narago:
( Y& o7 D4 g: B& U! D0 S2 sDisassembly of section .fini:
) X2 _" c. y) y& F, T; Y& f% Z6 |; K$ R$ s
000083e0 <_fini>:' |! K: p9 X7 K# s- `
    83e0:        e92d4008         push        {r3, lr}9 ~) i$ c: K7 K6 Q  V* e
    83e4:        e8bd8008         pop        {r3, pc}
" ~. j$ R7 R& W
6 l" H* R$ d/ ^0 g* l/ ?: _& ^. M8 l: W4 I2 l; o
  }- u4 A# |& R% ]4 j

作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。9 K, G$ G% ~" x" _2 A+ |
我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。
, e9 Y8 q0 W8 S关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4