嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具9 {/ Q& h! J1 V7 N
arago-2011.09-armv5te-linux-gnueabi-sdk
, v- q" b# n; a# L$ Q4 V* c5 jarm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu& E6 R% C! g; F9 }: L
这两个 交叉编译 工具 有什么区别  
4 ]0 O5 A5 r/ M: N
' i  b% i5 d3 e; Q* Y' V2 a  L5 H

作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好7 C- O2 E, T9 x
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:03
5 |  o7 c% `6 N7 g$ e9 \arago 对 TI 的支持应该更好4 A3 v; B5 }4 t$ l* R; `9 N
http://arago-project.org/wiki/index.php/Main_Page
8 y% V" R% B( ]8 V# m& B( @
的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:
0 M4 s8 |+ K8 n4 g: h% I; g  1 #include<stdio.h>                                                           ' Z+ D0 T; v$ m
  2 #include<math.h>2 u* g5 c, U  E% |0 q' \
  3 int main(int argc,char* argv[])
9 I. O8 W/ N' P. y  4 {8 q/ E/ Z; a, c, [0 r7 a0 n
  5     int a,b,c;) |# K0 y" l, S/ R1 Z
  6     c = a * b;  n8 k0 w8 S, r7 m. w9 z0 R
  7     return 0;2 d3 p' X3 ]0 e& F) r) w* \
  8 }* O" O8 x* ]0 k  }" ?/ r. g1 f
5 H0 R0 c5 u4 \" S
下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看
% J( Y( q# d$ D9 h! o% z9 w8 gnone:2 ~) m4 `0 l" j" S; P2 g9 {7 ~/ B, g
000082e0 <_init>:$ a. D+ s; e; B5 ]
    82e0:        e92d4010         push        {r4, lr}
* w' H* j! s/ V, N1 T    82e4:        eb00001c         bl        835c <call_gmon_start>, [% i' C# z( Z* s7 o
    82e8:        e8bd8010         pop        {r4, pc}
) m$ Y9 M* X) A9 ^4 |9 x/ v- n+ Karago:
3 S; j* J: g9 G& g' Y00008250 <_init>:) K5 a, S: `9 {
    8250:        e92d4008         push        {r3, lr}, W1 L. I7 l) a6 @' o" n- V
    8254:        eb00001d         bl        82d0 <call_gmon_start>
& x+ \: p9 g; s3 n    8258:        e8bd8008         pop        {r3, pc}
+ e( p! Q& {' M
$ x" k1 |" ^. e+ j# qnone:2 T0 G$ ]  c$ ~  a+ z! g
000082ec <.plt>:
' k1 a" h' a% i/ c- h/ r5 J    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
! _0 [% P6 q3 e. V7 H* l' I    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>
* o: b9 J; Z+ Z    82f4:        e08fe00e         add        lr, pc, lr
* i" U& t/ N3 \: s    82f8:        e5bef008         ldr        pc, [lr, #8]!1 B1 t$ v% \6 R5 F
    82fc:        000082d4         .word        0x000082d4
: o5 F$ _: G6 R: `- k% k    8300:        e28fc600         add        ip, pc, #0        ; 0x0
) B6 n& W) Q4 ~    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000
# z' s$ r: S' [7 L) l  e. V    8308:        e5bcf2d4         ldr        pc, [ip, #724]!
$ m8 o& d  ^. }1 P* A% j# }    830c:        e28fc600         add        ip, pc, #0        ; 0x07 M- ?, J. v8 h/ {& j& f
    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000
/ M  e% o7 z# l6 v8 o% e    8314:        e5bcf2cc         ldr        pc, [ip, #716]!
4 {: ~! `/ J& F; t' \    8318:        e28fc600         add        ip, pc, #0        ; 0x0
: ~4 q3 T7 Q+ C' A* @' {( ^    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000/ c3 N8 T) B* F6 m+ r
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!9 t1 y+ ?, Q+ e) G) }0 `# W" I( g
arago:
( C9 l/ t- D  I0000825c <.plt>:
! A) v$ i8 c9 h    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)+ N6 L$ P+ a1 Q- o
    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>+ h) T! {. S* {" [
    8264:        e08fe00e         add        lr, pc, lr
$ C1 I8 {8 ~; w  r" C/ V8 k# {    8268:        e5bef008         ldr        pc, [lr, #8]!6 {( b* S, d1 s4 u; d
    826c:        0000827c         .word        0x0000827c
$ U1 j6 A) a" j6 G2 M& F' [    8270:        e28fc600         add        ip, pc, #0
/ Q3 J% W" |: d$ b( ~    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
+ u9 g) I0 X6 p# P2 |    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c
. }- `& k7 u$ C) H, y    827c:        e28fc600         add        ip, pc, #0$ K; D$ Q5 f6 R9 ^2 n+ `
    8280:        e28cca08         add        ip, ip, #32768        ; 0x8000, F; X  u. T% T! d& z" a8 v! o
    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274  l, X8 I! x7 ]* r
    8288:        e28fc600         add        ip, pc, #0
/ k" C) P+ _" a6 n) `. e8 J; f    828c:        e28cca08         add        ip, ip, #32768        ; 0x8000% u+ ^8 E( k3 c" Q+ v0 {
    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c
. f; s% z( }6 H7 Vnone:5 d- g: Z" w+ T/ @4 a" O
00008324 <_start>:
% t4 x2 R- |5 ^, y    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>1 h& |2 m& g9 s, g4 ^% h, e
    8328:        e3a0b000         mov        fp, #0        ; 0x0* ^  c3 p0 P2 V! F) {6 L; Z
    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
  D2 s9 q& N0 q; C" i    8330:        e1a0200d         mov        r2, sp
* ?, }* C' m+ i! j6 G7 q  D% g    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)* r# p1 }" Q& _
    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)% A( m9 A7 f! S% L: u" D: |
    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>1 W) i+ r1 w5 y- w1 ]0 `
    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34># U6 }' P; n) h( w2 s
    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!): ?" [( Z3 h( c2 t% d" c9 c5 A
    8348:        ebffffef         bl        830c <_init+0x2c>
; Z& l% }6 t# ]1 s4 R9 A' N1 d+ t6 i    834c:        ebffffeb         bl        8300 <_init+0x20>
# c! ?- F. h$ e3 e: k: K    8350:        00008404         .word        0x00008404
8 E% s$ m; Q2 J+ u: p5 `    8354:        000083cc         .word        0x000083cc- M4 s, L# A. e7 l9 I
    8358:        00008408         .word        0x00008408
+ P; S4 B. q# Z- Q7 \, Darago:
0 }& C+ ~8 E! G00008294 <_start>:. E5 ]/ V7 B3 U/ i
    8294:        e3a0b000         mov        fp, #0# I+ d3 |4 ?1 T
    8298:        e3a0e000         mov        lr, #02 `& \* @- Y+ h0 Q2 j% W: g
    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
. `  c/ o8 q! d: A    82a0:        e1a0200d         mov        r2, sp5 C# Z2 U; B  n( H$ j4 j
    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
/ H+ K. g: B6 M; T- x3 T; l& }    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)9 Z* t! D/ g4 J9 r, J
    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>
; D$ q* _  n, Y5 w# h" T    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)
$ c4 S( ^; w4 y- h% H9 c- }" Y    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>& i7 p3 G7 a# ]5 C( b' j
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>
2 W! x$ _- E9 ]2 Q, Q9 i2 [1 a8 b    82bc:        ebffffee         bl        827c <_init+0x2c>8 N1 i3 O) g' V, ~0 K; J
    82c0:        ebffffea         bl        8270 <_init+0x20>& Y5 H: X! D3 ~- V
    82c4:        000083dc         .word        0x000083dc/ H+ N3 l( B" w, Q4 w
    82c8:        00008344         .word        0x000083444 {$ p# o0 ?5 N* U  ~
    82cc:        0000837c         .word        0x0000837c4 O7 ~0 d* D! S  ~" ?' i3 a9 M
none:) I  ?) M9 X5 R  A' U/ \, Q
0000835c <call_gmon_start>:7 C; f  T/ O; v5 x& T
    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>
- v5 l9 x: J4 n  G% }    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>- i; I/ B0 h1 _- p
    8364:        e08f3003         add        r3, pc, r3) p8 [* j6 ~# W3 Z8 u/ K
    8368:        e7931002         ldr        r1, [r3, r2]
" _3 {# h* x$ x! U. v+ T    836c:        e3510000         cmp        r1, #0        ; 0x0
3 _& ]! D4 U6 y; d2 a5 [/ B    8370:        012fff1e         bxeq        lr
# p" g% C% X* J# R4 X    8374:        eaffffe7         b        8318 <_init+0x38>
1 p" @4 o% D, I3 \  r, q$ b    8378:        00008264         .word        0x00008264
7 e( v7 p4 l0 O: M5 T6 g    837c:        00000018         .word        0x00000018
! z4 k$ @# L# N) e; Parago:" h1 Z- s, t% U' L+ Q0 @
000082d0 <call_gmon_start>:$ Z8 [6 x* M7 L, \* E3 \! x
    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>
8 n8 ~3 Z" t& w9 N# r2 G+ t    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>
- k) I8 H# T( _+ J. Q6 F    82d8:        e08f3003         add        r3, pc, r36 h- Q& `- _3 ^! }5 |
    82dc:        e7932000         ldr        r2, [r3, r0]
) {( W# I& F3 h    82e0:        e3520000         cmp        r2, #0  a3 ~' S1 m9 }  Q8 Q; l
    82e4:        012fff1e         bxeq        lr) ?/ f+ u( E9 E- U" |
    82e8:        eaffffe6         b        8288 <_init+0x38>
- z2 A8 t8 \. T/ c5 o# k    82ec:        00008208         .word        0x00008208
2 q- y7 o% P$ |% x1 W1 l    82f0:        00000018         .word        0x00000018
4 o# }. A, }; F- u* F/ tnone:  q2 A+ K# Q- n3 o) E7 [
00008380 <__do_global_dtors_aux>:5 U2 Y# _: X2 @
    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>: n5 K/ O& L/ }, N* i1 k: T1 G
    8384:        e5d23000         ldrb        r3, [r2]( _0 y$ P7 F( f
    8388:        e3530000         cmp        r3, #0        ; 0x05 M# f2 X% i. ^
    838c:        03a03001         moveq        r3, #1        ; 0x1
# j! r- [) M0 I& X4 m. w! i    8390:        05c23000         strbeq        r3, [r2]6 U, ~( N3 ]/ G4 n: F
    8394:        e12fff1e         bx        lr
; d2 U% [% M/ z    8398:        000105f4         .word        0x000105f4
* {' {1 f8 A- u8 u4 d! aarago:* S' L9 v% X/ v: S0 L3 _  K
000082f4 <__do_global_dtors_aux>:
' D! a# }! ~  r* B: ~+ t  ~4 b: j, `+ i    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
2 r: E3 G2 ]! o    82f8:        e5d32000         ldrb        r2, [r3]' w1 }' x9 @8 t! ^* j/ R
    82fc:        e3520000         cmp        r2, #0
  Y) B, L+ u: Y% w( {) f3 }    8300:        02822001         addeq        r2, r2, #1+ h; |5 _. u4 k( V& w6 c1 v
    8304:        05c32000         strbeq        r2, [r3]4 F* E% b2 D, {
    8308:        e12fff1e         bx        lr) {) ~6 i% a" U. K" f
    830c:        0001050c         .word        0x0001050c
/ d3 D/ e% H+ F! i4 Qnone:
8 C. t) Z$ f6 X6 X, L5 u; f" J0000839c <frame_dummy>:
( I* H) v' W1 d8 ^- l3 \" ~" o: e  y2 ^    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>- v! @8 n7 ]" Z: m
    83a0:        e92d4010         push        {r4, lr}3 K! N- k, M2 o3 u7 m9 c3 J2 R# o
    83a4:        e5903000         ldr        r3, [r0]- e8 ^, A9 S2 M# F0 c( D2 ]
    83a8:        e3530000         cmp        r3, #0        ; 0x05 a5 H4 R, B( V
    83ac:        08bd8010         popeq        {r4, pc}- A% W2 P3 F' H( K  \. k- z" c5 w
    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>7 ?- w& a5 x/ s* Q6 F
    83b4:        e3530000         cmp        r3, #0        ; 0x0$ x* U- \+ f; `* c4 k
    83b8:        08bd8010         popeq        {r4, pc}2 D7 X1 L4 d5 L3 _% s/ m: f  f
    83bc:        e12fff33         blx        r3
7 E. [; j4 X- i+ ~+ ?! m    83c0:        e8bd8010         pop        {r4, pc}, p2 @+ `/ I) d4 l
    83c4:        000104dc         .word        0x000104dc" F" O3 \9 l. ~+ C, Z( g5 D8 G/ i
    83c8:        00000000         .word        0x00000000) F1 j9 N: Z+ `# v: S6 ^+ ]
arago:9 Y9 _5 B. O8 [# c* z! k0 d  M
00008310 <frame_dummy>:
- q% U; @' x; q8 x) [    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>
5 M; @2 t; n# a8 v! {: K6 ~    8314:        e92d4008         push        {r3, lr}( O7 g" t* a8 V1 K. E, W
    8318:        e5903000         ldr        r3, [r0]
! j) N6 C4 L  |; {, z    831c:        e3530000         cmp        r3, #0
$ a7 w3 f4 o; N- s. M    8320:        0a000003         beq        8334 <frame_dummy+0x24>
: l4 }" [% S2 S    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>9 l& q2 i# J+ c, V6 e& ~5 l7 |
    8328:        e3530000         cmp        r3, #0% v* l7 ~6 k9 c) a! F" G, t
    832c:        11a0e00f         movne        lr, pc. j5 q% ]" H# X0 D1 T0 u. h& u
    8330:        112fff13         bxne        r3! X' }) d# Y; ~% j8 [( c
    8334:        e8bd4008         pop        {r3, lr}
8 ^0 X1 L( c3 c# q2 i5 ?5 T    8338:        e12fff1e         bx        lr$ G$ K) I, q8 {" U  j! z9 R
    833c:        000103fc         .word        0x000103fc1 C' H4 K! i9 o" O4 N
    8340:        00000000         .word        0x000000006 _1 T: K: K" S& |4 Z) L
none:
" U0 x- l9 w* j" P" G' t& Z" b000083cc <main>:
3 g+ U: s0 z. j6 @6 H2 |" o; n    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)9 n$ Z* d# v3 o5 t
    83d0:        e28db000         add        fp, sp, #0        ; 0x0
: K2 K" n! {) T    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c
1 c$ l+ Y' b3 x* |1 T    83d8:        e50b0018         str        r0, [fp, #-24]
. D( _9 a' Z" e/ y2 C5 P) C    83dc:        e50b101c         str        r1, [fp, #-28]  G) l* W# j3 L; w
    83e0:        e51b2010         ldr        r2, [fp, #-16]
& o& n& b. y) R) b4 K, F    83e4:        e51b300c         ldr        r3, [fp, #-12]
  o, B6 P5 D" d    83e8:        e0030392         mul        r3, r2, r3
; L+ I+ E: ?3 B4 E    83ec:        e50b3008         str        r3, [fp, #-8]* K8 S% n% ^( y2 P( ]. F. ?: Z
    83f0:        e3a03000         mov        r3, #0        ; 0x0$ e7 K) U6 @8 l9 v4 }+ R0 W
    83f4:        e1a00003         mov        r0, r3. q" ]0 n$ x2 y4 k7 m
    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
* J1 u! K) S5 h    83fc:        e8bd0800         pop        {fp}- v/ p3 B+ p" h- p' v
    8400:        e12fff1e         bx        lr7 ?1 V, p! H. I9 n" o
arago:7 {3 I1 p2 {, b0 }
00008344 <main>:
: B" s! c' P: y6 s& z! Y    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)  o' M$ t8 Z7 F6 _, b
    8348:        e28db000         add        fp, sp, #0
! @  f" ^: C* A- E" O    834c:        e24dd01c         sub        sp, sp, #289 {: h! B* Q% [: y8 @1 A0 I
    8350:        e50b0018         str        r0, [fp, #-24]/ X* ~$ `0 G7 S/ f% q$ g
    8354:        e50b101c         str        r1, [fp, #-28]
+ }8 `- N5 n8 Y! p! ~) P! s+ N    8358:        e51b3008         ldr        r3, [fp, #-8]5 k% g) j; G* M# y; ^2 \0 o7 E
    835c:        e51b200c         ldr        r2, [fp, #-12]
( {# S1 s1 K0 z% k9 m8 N    8360:        e0030392         mul        r3, r2, r3) S/ }2 X( j  o) x4 H4 @
    8364:        e50b3010         str        r3, [fp, #-16], W& d7 p0 c; v# g/ I
    8368:        e3a03000         mov        r3, #0
% X& M' W( l" s( w9 x- o" c) ?6 q    836c:        e1a00003         mov        r0, r3$ ?3 y. i  W# a* u5 R
    8370:        e28bd000         add        sp, fp, #0
+ k1 J" ]/ _0 s& ~/ }+ `    8374:        e8bd0800         pop        {fp}: d. a( X2 N3 e- T
    8378:        e12fff1e         bx        lr
) C0 u" _# S+ c% a  Y* N$ n1 a# _none:
: S; y: H9 u8 m1 s7 n, Z00008404 <__libc_csu_fini>:- ]5 ~) L- A+ A$ {. N
    8404:        e12fff1e         bx        lr
: g+ y* W7 G  O1 {; varago:
" k" V) t8 k+ @/ z000083dc <__libc_csu_fini>:2 ?# j# z. t4 y) d4 u) k
    83dc:        e12fff1e         bx        lr
' t. ~- v# U3 n- \' W5 anone:
8 J) P. u3 Q. b, Q5 B00008408 <__libc_csu_init>:
' V$ |, d$ \0 ]4 \    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}; [+ {! m5 u) s+ _2 v8 u* h! Z# w
    840c:        e1a08001         mov        r8, r13 [5 M, i/ e' s  W* [& x+ L
    8410:        e1a07002         mov        r7, r2; q- Y; ~. L6 H( F5 |
    8414:        e1a0a000         mov        sl, r0, Z0 s/ p+ b* q& n
    8418:        ebffffb0         bl        82e0 <_init>: f# V* y" Y/ u1 ^4 Z& e
    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>- f( f) d! z% s- E) [* k2 m
    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>% [- K( A8 K! o  R' E: S  V" `
    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
& A! ?/ E0 H  v9 D    8428:        e0613003         rsb        r3, r1, r3
5 U- ^1 }: e& ^0 ^1 x/ U# l) a$ P    842c:        e08f2002         add        r2, pc, r29 Y; {+ V* k1 N) G! g7 Y: x
    8430:        e1b05143         asrs        r5, r3, #21 A2 K, r) _( S0 D
    8434:        e0822001         add        r2, r2, r1
- @7 K) {9 V/ x    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}3 {0 q5 D' V, T, f9 E+ ~/ x
    843c:        e1a06002         mov        r6, r2
3 _! P) w" L9 D& ^* m7 n    8440:        e3a04000         mov        r4, #0        ; 0x0
6 y8 O) _% X6 P8 M    8444:        e1a0000a         mov        r0, sl' y4 K& N& W7 T' R
    8448:        e1a01008         mov        r1, r8
! H: C/ r( y+ s. x! u: X    844c:        e1a02007         mov        r2, r7- g6 s' A" i% K& [( [
    8450:        e1a0e00f         mov        lr, pc- u8 j; z$ _% b7 u6 d
    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]
7 D! p; g- g& \( Q5 s    8458:        e2844001         add        r4, r4, #1        ; 0x1
3 Y" E  A  m$ c  @( w' P/ N    845c:        e1540005         cmp        r4, r5
( N- r$ Z& g" M# s0 g' ?    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>
2 a5 \+ d' ]. z7 i% t8 Y    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}5 g% _' w7 ^4 N0 C. m0 C
    8468:        ffffff04         .word        0xffffff04
) h+ Q1 V( |& |9 p+ R    846c:        ffffff08         .word        0xffffff08) v) ^/ ?( g+ B9 h% e3 v, @; e  ~
    8470:        0000819c         .word        0x0000819c
& Q  S7 @5 p4 a3 e5 Z9 rarago:: ~% Y3 i, \# \
0000837c <__libc_csu_init>:, p  x' `8 I" a9 u& \8 j
    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}
0 {# D- t3 a8 z/ q: C' G+ X! @$ G    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
3 z$ J. v4 [7 g, i' P2 E3 M% E    8384:        e1a06000         mov        r6, r07 Y, q- D9 W0 E& P2 A: R
    8388:        e1a07001         mov        r7, r1+ K+ x# Z2 y: ~6 L- h5 @) K$ e
    838c:        e1a08002         mov        r8, r2
$ _! t' D* \0 O- E    8390:        ebffffae         bl        8250 <_init>' P  U$ V, s- U3 Q' |
    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>7 O  d' p. R3 m& B$ r: @
    8398:        e08fa00a         add        sl, pc, sl8 J" H! V$ P5 i5 h0 I: K
    839c:        e08f0001         add        r0, pc, r1
8 N8 A( y. ~1 \. v; h( E/ B+ l    83a0:        e06a5000         rsb        r5, sl, r0/ X% A- z' u/ x# @8 c* W) m' S
    83a4:        e1b05145         asrs        r5, r5, #2. D; L1 S0 }/ z8 w. S5 X
    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}
) H8 K- V) b! k  W    83ac:        e3a04000         mov        r4, #0, U: g* H3 s4 p% K4 L& n& x
    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]! D) k  D* I& w& `
    83b4:        e1a00006         mov        r0, r6
( ]9 o, s  ]! L" }, g1 Y    83b8:        e1a01007         mov        r1, r7
/ p6 I6 E( ]) B( W4 D2 O    83bc:        e1a02008         mov        r2, r8
1 L+ u& r' j" I+ j$ q* `6 d    83c0:        e2844001         add        r4, r4, #15 i6 V3 h) z7 [' W6 ^  d; l
    83c4:        e12fff33         blx        r3
0 E# U& [& i' A    83c8:        e1540005         cmp        r4, r5
/ U/ H7 y; a- B& b( f: y5 T. ]    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>$ \6 P* |6 y+ a1 k. J/ V! l7 S
    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}
1 R/ U: S4 o1 [2 n- n    83d4:        00008054         .word        0x00008054; P6 x$ ]& m' b, u% O
    83d8:        00008054         .word        0x00008054$ |5 E. w5 P! B+ ]! e1 ~$ w; |2 Y
none:5 ~7 M- A! A( p2 J7 [, ]
Disassembly of section .fini:, t( D  b# i# h% z
9 O6 n* q3 Z. |2 n6 r8 G
00008474 <_fini>:
6 w) \# c% A9 }% @    8474:        e92d4010         push        {r4, lr}
" \( U2 V" q* ~# I6 G    8478:        e8bd8010         pop        {r4, pc}
4 [3 W$ r; g7 }, N9 C7 Marago:  @. u- V9 Y4 A/ [. c: a
Disassembly of section .fini:: ~0 H4 b% S" m7 m- H0 W

; q3 g/ B# g8 e6 C0 {000083e0 <_fini>:  q3 O1 R: [/ v0 _6 M1 Z
    83e0:        e92d4008         push        {r3, lr}6 a' a6 A4 m8 @$ G+ z, D8 T# ^0 a
    83e4:        e8bd8008         pop        {r3, pc}
- `5 [: Z3 F$ I0 P
4 P9 \( O# t* `* O4 J; j
7 B; H# L. j* d4 x3 S; B3 a5 z, A% s

作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。
7 k% N& z" Z+ N- ]/ [我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。3 R. |; |# {9 m! m
关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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