嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具
( E6 l% w6 _9 l, Parago-2011.09-armv5te-linux-gnueabi-sdk
9 a; D4 y' ]2 i2 f1 varm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu
0 b, G2 V) a- |3 C# K这两个 交叉编译 工具 有什么区别  
( J9 Z0 X6 P' |2 W5 T
; V  }3 m7 j* m! Z3 I- y# i
, [( w/ o: w4 l$ \
作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好  a, ]7 `4 }9 Y
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:03
3 ~9 k3 S# x" I, Y9 [* @arago 对 TI 的支持应该更好6 J3 D& s5 {" ]0 ^! ?; n1 T7 `
http://arago-project.org/wiki/index.php/Main_Page

) J6 a0 T' c' g5 d1 l的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:' d2 U- m" _9 |5 [
  1 #include<stdio.h>                                                           ( O. d0 T8 e7 h5 {3 [. Q
  2 #include<math.h>! Z; v' o5 X0 ~& [+ j& n% P
  3 int main(int argc,char* argv[])
& V5 o$ S; y$ F2 U' ^  4 {: F( t* o: ~7 @, n
  5     int a,b,c;
! F; C' k  k5 z/ S  6     c = a * b;
2 X5 M# v( F, T5 f1 d" p+ o+ {4 J  7     return 0;' E2 C" l0 }6 U+ R1 X
  8 }- G( ]0 j( e3 {. q' p2 [( C5 U

9 p! H. O* }( I0 Y下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看
/ s! Z2 z' s6 r/ ]7 |none:" H/ s* @5 A4 j$ u: N
000082e0 <_init>:
; ?5 E! b  R  ~5 Q2 c7 U3 q- p    82e0:        e92d4010         push        {r4, lr}3 z% Q/ P( o- h$ P# T3 l6 L
    82e4:        eb00001c         bl        835c <call_gmon_start>
! \* {, P4 v; N  v    82e8:        e8bd8010         pop        {r4, pc}
, c4 T0 w. M2 d" @0 uarago:* n" n% U& \5 _/ y) u
00008250 <_init>:: }) W! g& L6 O, o! W" Z# d
    8250:        e92d4008         push        {r3, lr}
$ S  e" g5 M' I. K' p( V    8254:        eb00001d         bl        82d0 <call_gmon_start>
! D# C& ^8 L" {7 b) e- I    8258:        e8bd8008         pop        {r3, pc}: A: M0 p' y& K9 R/ a

6 t& r  k0 @/ Q4 u6 D$ `& |  u3 e9 Mnone:" ^$ r+ x# Z1 |6 {* ^0 D1 y
000082ec <.plt>:0 j: i6 ]. p! l( n
    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
1 U: Z* N* {% S9 `( d; k    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>
  b2 O# B" ?: A    82f4:        e08fe00e         add        lr, pc, lr
9 m9 T( P2 U' a$ ]    82f8:        e5bef008         ldr        pc, [lr, #8]!2 [, q- V0 r# ^
    82fc:        000082d4         .word        0x000082d4
7 }- i# r7 ]3 L& i: ]    8300:        e28fc600         add        ip, pc, #0        ; 0x04 k8 f3 `: `4 d9 L. o- w
    8304:        e28cca08         add        ip, ip, #32768        ; 0x80004 L* q' X2 y; U$ A9 q
    8308:        e5bcf2d4         ldr        pc, [ip, #724]!
& v0 Y' v& m% U    830c:        e28fc600         add        ip, pc, #0        ; 0x09 d, R$ I8 P# z  b
    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000( H8 S: S7 J+ e
    8314:        e5bcf2cc         ldr        pc, [ip, #716]!
( b: C$ M8 n: ?( G1 C    8318:        e28fc600         add        ip, pc, #0        ; 0x0& F6 ^) q' C. Q  Z+ T8 y0 Z
    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000% T: ?, f- f( Q2 a' y. G' m) A$ V$ ?
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!
) E+ M+ \& b, w: h, [arago:) U! {- [; n' I' }
0000825c <.plt>:
- k. y; }/ D0 T6 v& b+ p" v3 U    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
+ D$ d2 r; p& M5 |4 i; X    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>
9 ]% e* @' d7 D    8264:        e08fe00e         add        lr, pc, lr
2 @( x+ E6 b2 w- M, H' M    8268:        e5bef008         ldr        pc, [lr, #8]!4 v; r$ N$ o8 ?" E# ]: Y
    826c:        0000827c         .word        0x0000827c
: K' d( [! j  w    8270:        e28fc600         add        ip, pc, #0: [! x- F! S& F8 k' q  n
    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
4 z% u3 ]& g$ c9 w% Q9 x    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c
! y5 ]/ v1 T5 B" B" \) l    827c:        e28fc600         add        ip, pc, #0
. s, D3 d( U# d, E    8280:        e28cca08         add        ip, ip, #32768        ; 0x8000
8 v. B2 _. p1 r8 R    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274
2 L- M0 E2 C8 O; p4 L2 p    8288:        e28fc600         add        ip, pc, #0
: E* A0 ?0 J% z) W7 g# ]    828c:        e28cca08         add        ip, ip, #32768        ; 0x8000
5 Z/ B" Z: a5 l2 J    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c" w' [8 ]1 t, R" h# f5 |
none:) Z; \' I+ i0 t6 t9 h6 a
00008324 <_start>:
2 W* f5 A3 B2 E, ]6 [( f    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>! M$ ^$ ]8 `1 Q$ w! ~; T+ ^
    8328:        e3a0b000         mov        fp, #0        ; 0x0! P* E/ C. Z+ U# X
    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
9 h8 `/ O. }2 O0 r9 H) @    8330:        e1a0200d         mov        r2, sp! ?9 M2 z9 U8 f0 b
    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)) B$ l5 V3 u% B+ L; Y+ {$ M# S
    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!): x, C" |. m0 B4 v
    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>
3 n9 _; O9 G6 a1 w7 |    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>
1 G* |" s+ A& C* C" J    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)) d3 L( s9 ^9 n) n7 c, M
    8348:        ebffffef         bl        830c <_init+0x2c>
( |" s8 j8 |5 p" h) l5 i2 ^    834c:        ebffffeb         bl        8300 <_init+0x20>: h. t# S) g6 h$ J6 |; b1 P
    8350:        00008404         .word        0x00008404
2 U# k- d  Q4 N' A6 i! l7 V    8354:        000083cc         .word        0x000083cc6 Z3 q+ I/ J# i. E' o, K& R$ ^/ r
    8358:        00008408         .word        0x00008408
" s( _: K7 }1 z, oarago:1 ~! c7 T1 d4 R+ h% f
00008294 <_start>:7 I$ T4 T8 h7 ?! w4 _3 O1 U
    8294:        e3a0b000         mov        fp, #0* G7 a! W/ Z8 _
    8298:        e3a0e000         mov        lr, #0- W5 S8 M* S+ \; P
    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
* J+ u# }; o* p# |' J1 m    82a0:        e1a0200d         mov        r2, sp
) o6 I; g: ~/ c) I7 G4 ~    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
# G/ h$ r+ E" h5 H: |( Y( w    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!). \) S4 [0 o9 N5 p& A+ i
    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>8 _  N) u3 O, w* C1 E1 ?& a2 G
    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)
$ N. A% ]* U" `: i, ~6 a: d    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>( l0 e$ \. c4 R# s- D7 H
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>
2 \" \7 K9 a1 g* k8 M    82bc:        ebffffee         bl        827c <_init+0x2c>
7 M1 F  n; y& M$ _" C) d3 r( T    82c0:        ebffffea         bl        8270 <_init+0x20>
' K  q1 t8 D* u* B$ X5 Z    82c4:        000083dc         .word        0x000083dc3 Z+ A# u6 R9 C9 L
    82c8:        00008344         .word        0x00008344( j3 _$ i/ {$ \) g0 I( ^
    82cc:        0000837c         .word        0x0000837c
% K. h; \" n; l" q% \none:# P; p! u- i7 h$ @. u9 T$ O
0000835c <call_gmon_start>:
- j6 V- R" g3 D( ^# T- I    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>
% {7 Z( g* e' ?4 ]    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>
% Y! _1 V1 x% n; G# S/ a: t7 {    8364:        e08f3003         add        r3, pc, r3
  H- e- D" c# h5 ~    8368:        e7931002         ldr        r1, [r3, r2]6 A: G: ]4 S  E8 U) s
    836c:        e3510000         cmp        r1, #0        ; 0x0
& |3 e% {8 @" O7 K$ Q    8370:        012fff1e         bxeq        lr
$ ~5 Y! f( s; P# O    8374:        eaffffe7         b        8318 <_init+0x38>  G, y$ `, G- t7 ^4 m6 y+ J
    8378:        00008264         .word        0x000082641 P" T, B+ ~/ t4 e  ]& u
    837c:        00000018         .word        0x00000018
) [! s. Z$ \. x3 ~0 G1 |' }5 m: T' }arago:2 p! R. C; D& E/ T
000082d0 <call_gmon_start>:8 E6 L  H( [2 s% y) \+ i1 L
    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>
: n# g. E  c$ j2 f) F    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>! F3 z* @  |8 x3 U# a9 P* E
    82d8:        e08f3003         add        r3, pc, r37 g2 \) ?& A: l0 c
    82dc:        e7932000         ldr        r2, [r3, r0]
/ Z# Y3 H8 \/ l7 F1 p. d    82e0:        e3520000         cmp        r2, #0! h2 g5 R0 W. h* Y4 D  _) o
    82e4:        012fff1e         bxeq        lr
4 W# q2 D. k* @! J2 |9 G7 C4 a    82e8:        eaffffe6         b        8288 <_init+0x38>
" c) m$ i4 t" ^6 k3 b2 E    82ec:        00008208         .word        0x00008208
* `8 e, F3 S; d0 q8 D    82f0:        00000018         .word        0x000000189 a0 ?6 t+ b, E+ b3 {
none:
# D9 h5 y1 t+ |. ~" G4 s. y00008380 <__do_global_dtors_aux>:
, J7 _9 M+ r4 h  E/ M9 K7 K4 _9 N    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
9 x+ C6 l/ ^0 [/ f    8384:        e5d23000         ldrb        r3, [r2]0 J6 b& ]7 X6 w' G/ v" b5 n1 L4 i
    8388:        e3530000         cmp        r3, #0        ; 0x0
: F, D$ l7 b) X2 T3 s' C    838c:        03a03001         moveq        r3, #1        ; 0x1, s9 h8 ]' t$ k! |
    8390:        05c23000         strbeq        r3, [r2]
. |0 O- J$ n) w& @! a3 ]- y$ J    8394:        e12fff1e         bx        lr
! y3 O# J8 ^7 V" f& L9 _    8398:        000105f4         .word        0x000105f4( }5 h9 D+ D( I1 F4 Y% U" T  b
arago:; h1 m' W7 h; q
000082f4 <__do_global_dtors_aux>:
+ U/ ?" N) @0 s1 P    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
: C$ g" {+ a1 b; T7 J    82f8:        e5d32000         ldrb        r2, [r3]. y6 p$ A1 J8 h  W1 h* N/ T$ |0 v
    82fc:        e3520000         cmp        r2, #0) v8 Y' l: k) C, }% |
    8300:        02822001         addeq        r2, r2, #1
, Z6 Y; i0 a8 _) u$ w  l    8304:        05c32000         strbeq        r2, [r3]/ T2 f5 M; n$ }! ~+ R2 F9 W
    8308:        e12fff1e         bx        lr
$ F1 v' a6 M/ o3 P, Q    830c:        0001050c         .word        0x0001050c* x& n/ J+ |- x; R  [
none:
8 O9 z- N9 I2 M9 }) C$ c. X0000839c <frame_dummy>:: [- q3 j" {2 V& p- x
    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>
( y; i6 R0 V  ], y, P    83a0:        e92d4010         push        {r4, lr}
( S- V& o  M* D4 p2 V    83a4:        e5903000         ldr        r3, [r0], L, P- I5 m& f4 K2 V
    83a8:        e3530000         cmp        r3, #0        ; 0x0$ L1 g  e, L2 Q. r1 }3 e
    83ac:        08bd8010         popeq        {r4, pc}" A1 T* \$ o4 k# y
    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>
3 {4 [5 G/ t9 X! N( H- b. V    83b4:        e3530000         cmp        r3, #0        ; 0x0
2 q! a& V2 r1 o" v/ V    83b8:        08bd8010         popeq        {r4, pc}
  S  z% Q' |' P. q+ N    83bc:        e12fff33         blx        r3: L% x4 O8 L/ T8 t3 q9 p! C  o
    83c0:        e8bd8010         pop        {r4, pc}. o/ P1 x+ b( s& R$ y5 {
    83c4:        000104dc         .word        0x000104dc
2 ~9 L( F. k( L4 z6 I% U+ ]5 z: u    83c8:        00000000         .word        0x000000001 j$ r' R6 E' H- l6 r. B
arago:0 V1 V+ f7 x6 l1 O
00008310 <frame_dummy>:  W  l: t' f7 \+ n  l1 O/ E; T4 \
    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>
! V4 W3 V  y& m) E    8314:        e92d4008         push        {r3, lr}: G3 q; U% s$ M1 c  G/ R
    8318:        e5903000         ldr        r3, [r0]
1 w! t. q# l4 y7 ^1 e! P  ?0 [    831c:        e3530000         cmp        r3, #0: m! Y1 ^7 W& |! b
    8320:        0a000003         beq        8334 <frame_dummy+0x24>& ^, H9 U9 U4 ]3 V, d  d
    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>/ }: _- _6 Q* B, i* G' @* H2 F
    8328:        e3530000         cmp        r3, #05 x* P6 j/ ~, \* N2 T
    832c:        11a0e00f         movne        lr, pc5 ]( \1 W. |9 a8 X: r
    8330:        112fff13         bxne        r3
- E; c2 a  A" `6 w( @4 T    8334:        e8bd4008         pop        {r3, lr}& X" H5 u$ i/ ?8 A5 Q4 i
    8338:        e12fff1e         bx        lr
, b: g( {' @+ I" W3 r' Q* c    833c:        000103fc         .word        0x000103fc* Q" F3 |% R5 V0 P2 S4 {) e+ H1 U
    8340:        00000000         .word        0x00000000
" x& Y1 c) F' G1 ]9 @- F" Mnone:
$ Z' x5 T  ~1 _2 Q% @2 [- n000083cc <main>:
2 A0 a3 j' Q! K2 S. I8 u4 c    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
1 R/ V3 g# |8 Z. `8 H" S    83d0:        e28db000         add        fp, sp, #0        ; 0x0+ }5 b# t- f7 d+ Z1 o0 O
    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c
* L8 k  Q, y3 V6 i* M& B    83d8:        e50b0018         str        r0, [fp, #-24]) C' ^# T' ^+ B  Q; X9 j( h
    83dc:        e50b101c         str        r1, [fp, #-28]
% `% ]9 `  _; _    83e0:        e51b2010         ldr        r2, [fp, #-16]; |& A' N# |1 @* m
    83e4:        e51b300c         ldr        r3, [fp, #-12]+ V$ R' \1 {1 b& I0 u5 P
    83e8:        e0030392         mul        r3, r2, r3. l6 N2 J7 R: [% @7 W) X& u+ [* I- s
    83ec:        e50b3008         str        r3, [fp, #-8]  R# V, t7 e, V/ e3 Z
    83f0:        e3a03000         mov        r3, #0        ; 0x07 Z+ ?4 |9 H& C0 s
    83f4:        e1a00003         mov        r0, r3- Q$ d# ?/ k  c
    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
6 R% x. F/ n. h2 q" Z9 F    83fc:        e8bd0800         pop        {fp}
7 i7 [1 Q5 J  k' g4 p    8400:        e12fff1e         bx        lr" D: K$ p; x$ z/ h! Y$ K
arago:$ u( l) G% [5 y& U; I; z
00008344 <main>:
6 ?6 E. m# `  d: j: H    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)  Y' B9 A, O, f- ~% S6 e% O
    8348:        e28db000         add        fp, sp, #0
# b; X  g/ a: b" v3 Y6 ~    834c:        e24dd01c         sub        sp, sp, #282 E5 u/ L0 u1 k4 `7 f/ [7 y
    8350:        e50b0018         str        r0, [fp, #-24]
3 `+ Q2 A1 l  }5 F9 i7 V    8354:        e50b101c         str        r1, [fp, #-28]
9 h7 D. k/ m5 q    8358:        e51b3008         ldr        r3, [fp, #-8]
& Y9 i4 P: |3 b1 U    835c:        e51b200c         ldr        r2, [fp, #-12]
% x. L% g9 d9 x, o2 @+ G7 ?+ Q- V    8360:        e0030392         mul        r3, r2, r3& E& m8 ^8 f. R6 e; c
    8364:        e50b3010         str        r3, [fp, #-16]9 J" `9 R4 i$ E; X0 I( L$ \
    8368:        e3a03000         mov        r3, #02 Y5 T3 G. s3 H6 G4 O
    836c:        e1a00003         mov        r0, r3
% t( ?; D% }; P* f9 ^2 V    8370:        e28bd000         add        sp, fp, #0* a$ f4 _8 n, @% P( H3 E! y# b1 @6 o
    8374:        e8bd0800         pop        {fp}
4 X9 b& P( Q6 k0 u3 j0 [" F; e% q8 v5 ]    8378:        e12fff1e         bx        lr/ `. a' c* D/ ^4 A
none:2 p9 M; U0 n6 A
00008404 <__libc_csu_fini>:
1 ^2 c" m; E" \+ z5 c    8404:        e12fff1e         bx        lr; N- y1 e& X# \/ W& c7 p! U
arago:0 |( o; @$ P, ?5 F
000083dc <__libc_csu_fini>:/ ?7 Q$ P$ L" J; B: p
    83dc:        e12fff1e         bx        lr8 }% ^. V2 [) B$ b- A" ~7 k" m
none:7 W" E5 x3 z5 r) K- r! x$ H- `7 F
00008408 <__libc_csu_init>:
- u5 y1 W2 g- g; }6 b* R- C( |    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}! \3 A5 i, M  H4 \* W4 k
    840c:        e1a08001         mov        r8, r1. P2 d4 y8 |. W/ g# C- P& \
    8410:        e1a07002         mov        r7, r2& e  \" e9 e0 |
    8414:        e1a0a000         mov        sl, r0
. {6 _3 m3 F5 {4 X. z& Q# Z$ i    8418:        ebffffb0         bl        82e0 <_init>& _, y4 x/ v' \1 f8 L- K! w8 T
    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>8 \2 W+ |1 m+ B: L2 @$ ~# O3 C4 P9 a
    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>! w5 r- V! l  @9 t- @
    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68># c0 Q3 ?' H& h; c% X0 g8 H3 y2 Y
    8428:        e0613003         rsb        r3, r1, r3$ D- N) i, {4 ^7 S/ ~5 [* O
    842c:        e08f2002         add        r2, pc, r2/ V4 C) f$ {9 x0 b8 o
    8430:        e1b05143         asrs        r5, r3, #23 m# E$ E9 `! l6 l4 r/ Z( z9 T
    8434:        e0822001         add        r2, r2, r1& S( R- w( Y& L4 e" ~! o0 |, w$ e
    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}
; g, l; `) k$ ^. e1 G* p: }( _    843c:        e1a06002         mov        r6, r2
1 v4 l: H* i4 ~% o$ ]7 A    8440:        e3a04000         mov        r4, #0        ; 0x0
! ]$ [. Y" _: q: J& V4 Z    8444:        e1a0000a         mov        r0, sl
, O& T9 A9 f0 Y5 x    8448:        e1a01008         mov        r1, r8
0 v1 g, Q9 T: N! \6 ^+ S    844c:        e1a02007         mov        r2, r71 f1 ^/ _% E$ C7 H* ]
    8450:        e1a0e00f         mov        lr, pc
% `2 F4 @1 _# ?/ X, N9 Y5 y( i& W% X0 G8 P    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]
: ~& }) y, B4 W/ o/ f8 a" n8 o, i    8458:        e2844001         add        r4, r4, #1        ; 0x16 J" A% F0 h! j3 W% T+ M( n
    845c:        e1540005         cmp        r4, r5
$ K, K: t% d. v: R1 K    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>
7 Q' x2 @3 N7 o, w" j. `% ?' J1 ]* z    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}
) V8 X3 ?+ u- J& J8 I, `) q    8468:        ffffff04         .word        0xffffff04# K5 X1 g" \  C% r
    846c:        ffffff08         .word        0xffffff08
3 f% ]6 t% w# Z. i; p! D    8470:        0000819c         .word        0x0000819c6 h$ c# `( m  o; O5 A% z
arago:
. b3 u% ?8 |. i$ B1 E" F0000837c <__libc_csu_init>:( S6 S7 z3 U; R: t+ K
    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}
. y. n" ?8 Q7 o& e; e2 u( n# r& `    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
1 m$ Q% |1 W( v; d8 w    8384:        e1a06000         mov        r6, r0& g; f1 j  j; c2 ?- E
    8388:        e1a07001         mov        r7, r1
$ S6 C2 N, F9 A' p* `    838c:        e1a08002         mov        r8, r2
! @6 F  G/ ?' F* h8 r+ y! d5 j; t    8390:        ebffffae         bl        8250 <_init>
1 A1 g  i9 X( L    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>
, M5 C4 b" h4 E  P    8398:        e08fa00a         add        sl, pc, sl
+ C& d: m1 p9 {    839c:        e08f0001         add        r0, pc, r1  R. a7 }4 s+ O" x3 X! L7 E
    83a0:        e06a5000         rsb        r5, sl, r0
9 O# s+ Z' b: R: r    83a4:        e1b05145         asrs        r5, r5, #22 H1 q+ Z, c# t- }5 S
    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}( ]' E3 k6 `( U. e* k1 j+ c
    83ac:        e3a04000         mov        r4, #0
: {' C( H) \" N) ^: ~4 B. [% N    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]
, C! t; W/ G6 p5 d9 u+ T0 a    83b4:        e1a00006         mov        r0, r6  I  B5 f& I: Z" ]+ s7 q# D
    83b8:        e1a01007         mov        r1, r77 I+ I7 `3 z$ J( s+ O/ ]4 a
    83bc:        e1a02008         mov        r2, r8
6 R- ]# v( [7 E    83c0:        e2844001         add        r4, r4, #1* \9 b5 I* n& K4 w( N
    83c4:        e12fff33         blx        r3
+ q0 z& p1 f1 m3 W! _% ^) e    83c8:        e1540005         cmp        r4, r5
& n# X( a! \5 x( S; g: y& a; F6 Z! ~    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>
& J; d& h" P) }    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}3 u1 |. [4 T! X2 }
    83d4:        00008054         .word        0x00008054
& T1 @7 a$ r7 o* S# Y# `    83d8:        00008054         .word        0x000080545 G) `  I& P# c/ g
none:
3 z$ p9 D. Q& B- W( Z. ~+ WDisassembly of section .fini:
6 h! K3 F, F) ?0 _
' P; T8 a. w$ j" A  U' ?00008474 <_fini>:' m2 N+ c2 U" o) J2 ^
    8474:        e92d4010         push        {r4, lr}
6 f) g& M$ H. Z4 c1 `) Y    8478:        e8bd8010         pop        {r4, pc}
3 n4 ?/ T6 f0 M: K5 o9 L/ V; E% marago:
6 T: b% F( ~# ?* X5 l: XDisassembly of section .fini:7 p0 m' ]4 s% U" z

8 `9 v4 U% p* Z1 ]000083e0 <_fini>:
0 A  ~2 J6 V5 \- [4 d; t  ]( H) w    83e0:        e92d4008         push        {r3, lr}5 p) Q5 \  h. G' |" ?& T
    83e4:        e8bd8008         pop        {r3, pc}+ n% g! [* b) J8 w7 r: ]
1 j& }" J( _( X! O, E
/ K: l! G7 Z$ O1 _1 {3 Y
7 `' O* y( j# N6 H, ?0 l% P

作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。
" |) J2 P% h7 r& ], C1 w- U我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。
0 w6 x2 b) j0 T: g4 W- O/ L关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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