嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具% D- U! d; E& p7 o+ m
arago-2011.09-armv5te-linux-gnueabi-sdk3 w# a7 A& \1 [7 C8 y/ Q2 c' K
arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu5 @) A# }% d8 J0 h$ {
这两个 交叉编译 工具 有什么区别  ! |2 }& s0 X8 ~- P; y) E3 h" i. _
/ B8 L. ]* `1 W( j8 ~

. _  }) a3 ]' g
作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好8 h( K! j  H! f1 f  ~# l6 v
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:03" J. j& D" Z$ H! H: z
arago 对 TI 的支持应该更好
# T: M, o; U( T. O& S$ k5 q* Xhttp://arago-project.org/wiki/index.php/Main_Page
$ u' M( I; t5 M6 T" W) C' g/ G+ \
的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:( z9 C- V  _* l' }- s- u$ E
  1 #include<stdio.h>                                                           
9 S0 o6 ^2 A0 q' @7 p+ Q; ]) d  2 #include<math.h>
* G- s0 o! Q6 F7 s" c2 j, }  3 int main(int argc,char* argv[])
+ ]) h4 }: g3 a  O- n8 ?1 M/ G  4 {
6 L" V2 ^5 _7 d  O3 W/ o9 W  5     int a,b,c;
/ W6 M  P; T9 d. \3 ]/ q  6     c = a * b;
8 P  _. h! U# a& Y7 x  B  7     return 0;
% \: z/ V4 J/ X1 c  8 }
/ B  j+ p7 l- w' x; N5 W  b" }! e& i4 v
下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看4 R. \! C0 ^  d2 Y8 q! ?" M% E
none:
6 t6 r* w+ W4 _; V000082e0 <_init>:
7 i( S" A6 c7 Y; _8 y    82e0:        e92d4010         push        {r4, lr}5 u' h/ t9 O' r! c6 E
    82e4:        eb00001c         bl        835c <call_gmon_start>' |" C  S! f, \% m3 E- g
    82e8:        e8bd8010         pop        {r4, pc}
% k! J( i5 R3 g; Larago:9 J- \  Z% V( U( b, ]! g: v
00008250 <_init>:
: y# o' F) p, j+ F+ W0 A    8250:        e92d4008         push        {r3, lr}$ _' |) @% v# I0 T/ Y% L
    8254:        eb00001d         bl        82d0 <call_gmon_start>
$ I" g9 l/ n* i; F    8258:        e8bd8008         pop        {r3, pc}; a4 l$ v# |% e9 D& O9 ~' r

8 H( b# v9 A6 {) q4 x( Cnone:
1 ?& k+ ^4 A% ?* {8 B000082ec <.plt>:! J$ n) Q9 x9 u, V* G
    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
! C/ J- T0 o) z- {) t    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>+ U( Q# F( ]1 [5 T
    82f4:        e08fe00e         add        lr, pc, lr
: ~" M- x: f$ [' d5 ^& T    82f8:        e5bef008         ldr        pc, [lr, #8]!
4 Z, Y. s5 Q; P    82fc:        000082d4         .word        0x000082d4: W  u5 [% v5 I6 L7 @6 a
    8300:        e28fc600         add        ip, pc, #0        ; 0x0
7 l! u, Q9 c- e2 r9 i6 c1 G$ z+ G) s    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000% r' e7 ?; E4 D, G5 ~- V4 l2 Q9 V
    8308:        e5bcf2d4         ldr        pc, [ip, #724]!
2 ^% }  n  T& Z' B; L7 w    830c:        e28fc600         add        ip, pc, #0        ; 0x0) V+ Q! I& ^( ^& z% B( D! L
    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000
! x! y# p4 p4 F, T& U    8314:        e5bcf2cc         ldr        pc, [ip, #716]!
' p8 \3 T: P# Y    8318:        e28fc600         add        ip, pc, #0        ; 0x0
- q% A# R! b" K' h    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000: O1 J) ^; M* P' @' B. ?
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!  W* I$ i% @3 {
arago:  p. M  j( G; n' Y3 O: Z1 y# G7 V
0000825c <.plt>:
5 T0 N! k7 I* S. k5 y2 f3 d    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)1 P4 z5 D$ N  B% h/ Z, N
    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>
" g) r4 Y7 Z8 I" U& q, V4 v    8264:        e08fe00e         add        lr, pc, lr/ a& b' w7 T' x4 \
    8268:        e5bef008         ldr        pc, [lr, #8]!& p7 E+ }  [$ M% |6 X% D: b( J
    826c:        0000827c         .word        0x0000827c
3 b9 q; x4 N) o    8270:        e28fc600         add        ip, pc, #00 C! Y0 T" H( u( T/ Z
    8274:        e28cca08         add        ip, ip, #32768        ; 0x80008 @  H# A2 e! a% h) S
    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c# l' R+ y% ^9 T5 d0 G) L( e  T
    827c:        e28fc600         add        ip, pc, #0
5 }2 k1 E/ ?2 b$ @5 W/ Y    8280:        e28cca08         add        ip, ip, #32768        ; 0x8000# y8 K, G/ Z; Y/ O) \$ I7 g! Z, n
    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x2748 J9 a1 v# R4 N- C" K
    8288:        e28fc600         add        ip, pc, #0
4 k0 ]$ p; W5 i0 ~4 h    828c:        e28cca08         add        ip, ip, #32768        ; 0x80009 x: A. Y# v3 E
    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c
0 I$ j: X8 L4 R# W' q, @none:
) _% Y& I: a) j( V00008324 <_start>:
+ p: U) L; u, T. D+ a1 G- r    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>+ G  S8 d( t  k( |3 H
    8328:        e3a0b000         mov        fp, #0        ; 0x0
/ z$ h* g& ~) B5 Q7 A    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)4 @2 P6 D$ ^; Y; q
    8330:        e1a0200d         mov        r2, sp
; C* R( y8 z7 B" O0 h! v8 a    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
! l: C/ c# b/ y/ F1 I    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)3 U8 H1 k& ^% W8 F6 |2 {0 T
    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>
% R% s8 J5 k8 \2 o% O7 w    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>2 c: d3 N+ {3 k- u! v7 L, O
    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)7 i  j1 w, L1 N$ e8 h# V
    8348:        ebffffef         bl        830c <_init+0x2c>3 v1 H( N% N! y2 d7 h6 L9 b# n
    834c:        ebffffeb         bl        8300 <_init+0x20>( @! `4 X7 F/ H% c/ i" x- F
    8350:        00008404         .word        0x00008404
% N, h' X3 Q$ y    8354:        000083cc         .word        0x000083cc! m, T) K8 M+ {& A0 M0 a
    8358:        00008408         .word        0x00008408  m* N& N2 j# C- S
arago:! U/ R' p: l& g% @
00008294 <_start>:
8 g; Y! ?% g) Z8 m2 g, V    8294:        e3a0b000         mov        fp, #0: |% ^  H# x  v) P+ K1 _/ ^
    8298:        e3a0e000         mov        lr, #0
' j! l- d+ B( T- B1 O/ Y& G2 E    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4). e( R* M& {7 j7 n& H9 A( x
    82a0:        e1a0200d         mov        r2, sp9 Q# }6 ]: s0 Y2 ~
    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)8 [& M$ K* U% ?3 ^
    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
" Y+ y9 M& ]) i4 w* l9 }8 j    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>/ e4 C" U: U/ H: I. Q9 s' }( f$ f
    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)  O7 O8 h# X9 s
    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>0 D6 o, o) Y! f+ T  D
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>
0 h2 ^+ M8 Q) d8 l% s4 k) h+ H    82bc:        ebffffee         bl        827c <_init+0x2c>" K6 s, {# H5 m* v! t7 W/ |( ^
    82c0:        ebffffea         bl        8270 <_init+0x20>
+ w7 w0 G8 I6 H) O$ K    82c4:        000083dc         .word        0x000083dc
7 N/ }( [- f- y* F& ?  S/ E' c! l    82c8:        00008344         .word        0x00008344. f! U, k% C, m. V2 \
    82cc:        0000837c         .word        0x0000837c# B0 q1 h9 W0 }9 n* _1 D5 y- V- F
none:3 C# ~0 p) Y5 Y; ^8 o
0000835c <call_gmon_start>:2 N+ I7 i. Y- T  B! p6 w
    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>" u5 P$ w: z0 M1 ~
    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>
9 m% Z, _) V. w( ^2 T# B" X    8364:        e08f3003         add        r3, pc, r39 P, [7 f0 v* F3 r" M, |9 x$ I
    8368:        e7931002         ldr        r1, [r3, r2]1 `: a7 K& `$ j7 m( Q" ]# t
    836c:        e3510000         cmp        r1, #0        ; 0x0
3 Q" C+ x/ Y5 c7 d* l0 L5 I    8370:        012fff1e         bxeq        lr
0 B  E& t  u, f) I: r    8374:        eaffffe7         b        8318 <_init+0x38>
& ^* b) `% R% {/ S6 C4 u, r8 K7 _    8378:        00008264         .word        0x00008264
- Z: v# b8 Z0 D; N0 ?* o/ ]" w    837c:        00000018         .word        0x00000018
' s* S% i9 W( v( ], O5 f% ]arago:
# A/ V% f. q& F+ h: x4 ^000082d0 <call_gmon_start>:
; X: s# p3 F- o9 T4 F    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>; J4 Q6 ]9 e! p+ ^. d1 r& `
    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20># H+ A& _0 s! M" w$ ~- v* X7 K
    82d8:        e08f3003         add        r3, pc, r34 l- y7 b. k" P0 ]# T
    82dc:        e7932000         ldr        r2, [r3, r0]
( n4 ^* w5 a/ ?6 I    82e0:        e3520000         cmp        r2, #0; i) v2 h; Q; o; b
    82e4:        012fff1e         bxeq        lr
; t2 |. A6 M* p0 @  \0 x  j    82e8:        eaffffe6         b        8288 <_init+0x38>& N- \. \3 w1 H3 }4 T  ^( R0 M
    82ec:        00008208         .word        0x000082081 x) O& t6 \% o, a
    82f0:        00000018         .word        0x00000018" P9 h* [5 V( }: B
none:
6 b+ e1 m0 F* o- |00008380 <__do_global_dtors_aux>:
  _/ v$ z$ A: s" |6 j    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
4 T% c7 M" N) f5 B) f    8384:        e5d23000         ldrb        r3, [r2], a% M- [! b* a+ z3 J
    8388:        e3530000         cmp        r3, #0        ; 0x0
& |( y+ V# [$ y; r0 m    838c:        03a03001         moveq        r3, #1        ; 0x1* }  x  j% O6 h) a
    8390:        05c23000         strbeq        r3, [r2]6 ~1 f; s+ A! E4 o' H: \
    8394:        e12fff1e         bx        lr% v* x  i$ g! K7 n) n: t
    8398:        000105f4         .word        0x000105f4
: N! X! v/ Y+ ?1 xarago:
: K' p' _; S  l) x000082f4 <__do_global_dtors_aux>:9 Z, N  [( T9 j5 }" F" U) ]
    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
, i9 M& P' p0 L2 ?$ B    82f8:        e5d32000         ldrb        r2, [r3]
; R$ K/ |- w: G! S- n. |( r    82fc:        e3520000         cmp        r2, #0* _. s7 ]& T4 P+ Y) E! u2 }, \
    8300:        02822001         addeq        r2, r2, #1: x" J- O/ m7 o
    8304:        05c32000         strbeq        r2, [r3]
3 |; t2 |# o$ k8 `    8308:        e12fff1e         bx        lr
8 }) i, ?  A. a9 J    830c:        0001050c         .word        0x0001050c
. O. r1 Z* h* O- ^8 w4 \) znone:
: N$ @% M# L  v! [; d0000839c <frame_dummy>:
( i+ x5 a. |) x+ W- k7 J    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>
6 B& ^$ a  Q. a/ i! o8 Z    83a0:        e92d4010         push        {r4, lr}- V6 N5 \5 f4 L( y1 X% M7 \4 o
    83a4:        e5903000         ldr        r3, [r0]! [+ T. v# F5 v- k0 N
    83a8:        e3530000         cmp        r3, #0        ; 0x0
" R0 v4 S1 @1 D" E/ w# {    83ac:        08bd8010         popeq        {r4, pc}9 Q1 t. i0 Q1 i  U, Q
    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>/ f: V' f) q* I+ _
    83b4:        e3530000         cmp        r3, #0        ; 0x0
( \; `# t# _- @8 D( C1 Q/ A    83b8:        08bd8010         popeq        {r4, pc}* _6 w  r. d7 C# S6 U
    83bc:        e12fff33         blx        r3
, f( ~. _$ Y! M$ M$ [    83c0:        e8bd8010         pop        {r4, pc}& ~% @( D/ W4 B% ~
    83c4:        000104dc         .word        0x000104dc2 ^6 P$ y4 K4 e* z1 ^
    83c8:        00000000         .word        0x00000000
- j' K) H$ x  d8 e) Q$ h, narago:
6 {1 b) I6 N1 [00008310 <frame_dummy>:. h5 v: v* n! o4 C& c
    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>
# R: T% D. B: W6 f    8314:        e92d4008         push        {r3, lr}
# s8 ^, l3 A: ?    8318:        e5903000         ldr        r3, [r0]
9 |' E$ ]7 U$ Z; v: k8 w5 y! I    831c:        e3530000         cmp        r3, #0
- A* Q( ~. }9 L' ?0 z    8320:        0a000003         beq        8334 <frame_dummy+0x24>& `. |. W* m% }6 |4 a
    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>) Y- [% Q* d! N2 [; U# P
    8328:        e3530000         cmp        r3, #0
' b. N4 r3 i# D& q. Y    832c:        11a0e00f         movne        lr, pc& ]/ e# v* x: M1 M8 t0 G& O$ m; h/ @8 ]1 u
    8330:        112fff13         bxne        r3( P+ f- d/ X. `8 ]; {( ~" }; z
    8334:        e8bd4008         pop        {r3, lr}. U  F5 z3 u; P) F. C
    8338:        e12fff1e         bx        lr
) y0 {( _7 m1 ^$ J+ e    833c:        000103fc         .word        0x000103fc
7 L3 A! D) h$ W    8340:        00000000         .word        0x00000000
0 L8 @1 H1 H) ynone:6 b1 M* k$ N. v; m3 I# u
000083cc <main>:+ D! Z# [4 @6 O2 }! t
    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)& l+ K8 `: z9 a; H
    83d0:        e28db000         add        fp, sp, #0        ; 0x0
  a& p$ G4 E% P# K% T2 S# s  }    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c1 Q: A8 y9 K( Q. t* P* ?
    83d8:        e50b0018         str        r0, [fp, #-24]
' `& V# g* }" X8 ]  B    83dc:        e50b101c         str        r1, [fp, #-28]
& ^$ n- i: I5 }) _: K; @3 z0 b    83e0:        e51b2010         ldr        r2, [fp, #-16]
5 `8 ~7 P; R, l" Z& m% Q% o9 G) K, l& g    83e4:        e51b300c         ldr        r3, [fp, #-12]
# t  h6 S6 ^: T! r: q    83e8:        e0030392         mul        r3, r2, r3
4 r+ u0 K9 W$ a% ]    83ec:        e50b3008         str        r3, [fp, #-8]' _2 f! ?5 e- X9 g) m7 e
    83f0:        e3a03000         mov        r3, #0        ; 0x0, Y. B( ^0 ^- K9 l% _
    83f4:        e1a00003         mov        r0, r3% I  @7 S5 C4 I0 Q
    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
9 G) d/ A* F2 y1 u0 r, U3 ?    83fc:        e8bd0800         pop        {fp}
) d& F  G. {* W( z    8400:        e12fff1e         bx        lr2 _( H+ n! T. n$ [: p% k$ S( _
arago:
6 A  T' U% p, A) l* v00008344 <main>:- _" U% B/ w! j) [
    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
9 u7 ^! H  A6 J    8348:        e28db000         add        fp, sp, #0' q2 S# Q/ W- g/ L' a# D# u) V
    834c:        e24dd01c         sub        sp, sp, #284 U9 I% @+ A+ B5 Y9 |) u& l
    8350:        e50b0018         str        r0, [fp, #-24]
& U! a# c  T0 z. B) j5 a    8354:        e50b101c         str        r1, [fp, #-28]' [/ u) y' h$ \' v' k
    8358:        e51b3008         ldr        r3, [fp, #-8]$ I' {8 x2 k9 Y1 ?3 D; a
    835c:        e51b200c         ldr        r2, [fp, #-12], y4 b$ M$ C  ~0 b) n
    8360:        e0030392         mul        r3, r2, r36 o5 q2 e+ ~. Q6 ?  Z/ x
    8364:        e50b3010         str        r3, [fp, #-16]8 ?' p) m& k) p
    8368:        e3a03000         mov        r3, #0
5 n* B$ H" J! Q; W  _; S    836c:        e1a00003         mov        r0, r3- Y. {" a" w; {$ Q  [
    8370:        e28bd000         add        sp, fp, #0
4 u. N9 A1 W% \* a9 e- U2 z" I    8374:        e8bd0800         pop        {fp}; L. V) ^  w+ O/ n- U% q3 v3 W% H$ v! |
    8378:        e12fff1e         bx        lr
1 u4 b* X! b( F* n7 dnone:
; A6 K% }3 D$ P' w00008404 <__libc_csu_fini>:# h1 Q+ C. H) O$ }5 I' Q7 t- H
    8404:        e12fff1e         bx        lr6 j" X5 X- F/ D# Z0 p( N: U
arago:6 Q! u* k# Y4 d2 N
000083dc <__libc_csu_fini>:
6 ]6 E. ~) v: i    83dc:        e12fff1e         bx        lr  Q) p0 I& K4 j# a9 v4 E+ O
none:
# X* A9 |: `$ `# U- ~8 |& {2 w00008408 <__libc_csu_init>:
& Y! ]' Z6 k% [5 v7 g3 z    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}% p9 E' E% d7 j7 w
    840c:        e1a08001         mov        r8, r1/ r1 E! N$ F& K/ x# j% ?
    8410:        e1a07002         mov        r7, r2
4 x2 G. n# _- a$ y0 E2 d+ a5 d    8414:        e1a0a000         mov        sl, r04 `1 q! V/ A; @: V- Y1 F
    8418:        ebffffb0         bl        82e0 <_init>4 |* m; V2 z3 t; r% Q. @
    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>( p+ o# e  ^! G0 o- A
    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>
0 B% F- \+ a- }# w    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
9 r, }( C% P$ |+ H! B4 i* Y    8428:        e0613003         rsb        r3, r1, r3
& I4 z1 m' i: B    842c:        e08f2002         add        r2, pc, r2
; W* D5 g9 x2 ]    8430:        e1b05143         asrs        r5, r3, #21 H) k; H5 J# w
    8434:        e0822001         add        r2, r2, r1
: v. }, u: o* {( B* Z    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}
% f# K+ f: M% B: P/ D    843c:        e1a06002         mov        r6, r2
! O, e7 @+ k6 {; Y0 N$ X& U% p    8440:        e3a04000         mov        r4, #0        ; 0x0$ j( e1 r1 E# }+ N! U* M
    8444:        e1a0000a         mov        r0, sl
$ z/ u% k6 J6 \/ _% ?* z2 Q    8448:        e1a01008         mov        r1, r8
# @) b) k' ^1 z0 L* L    844c:        e1a02007         mov        r2, r7
% s7 D. @( @. O2 k+ t* y, K    8450:        e1a0e00f         mov        lr, pc
5 B' c. ]3 c! t. b5 h& ]0 [+ J    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]3 \% |- {1 x, m* Q3 z
    8458:        e2844001         add        r4, r4, #1        ; 0x1
$ T7 ^! z9 k, U, Z3 l$ L7 U5 T    845c:        e1540005         cmp        r4, r59 W" W3 U4 @9 N6 K" N
    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>) ^! F3 x% l2 b! n5 t5 Y5 R  K
    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}) }) x: \6 p: w5 T3 o
    8468:        ffffff04         .word        0xffffff04
* Y' G' Q% w# T, i/ L: u    846c:        ffffff08         .word        0xffffff08. n8 N2 Y0 k4 a  K6 q& |( H5 y
    8470:        0000819c         .word        0x0000819c
9 r# v. o  ~3 u7 k0 V6 warago:
& D- c& M- n- j1 [3 m. M' W" [0000837c <__libc_csu_init>:, u6 a  x/ \1 Y
    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}
4 J8 F& U% @6 {; J5 _( c    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
! H5 h# k8 H2 j6 C6 @* R# ~+ J    8384:        e1a06000         mov        r6, r0, `# U/ J0 W2 [: X" c: {3 }
    8388:        e1a07001         mov        r7, r1: t0 k  N  H$ \' Q. v- X
    838c:        e1a08002         mov        r8, r2
. }; J5 m. Y5 ^9 n; F- \' g1 ~' ]    8390:        ebffffae         bl        8250 <_init>
' J7 t- {( j+ `2 ~4 W    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>/ y) f1 n( L4 z/ Z
    8398:        e08fa00a         add        sl, pc, sl
: t3 [% {7 W8 @4 ~) j% r    839c:        e08f0001         add        r0, pc, r1
* V. p* j! L. Q9 m    83a0:        e06a5000         rsb        r5, sl, r0% W$ F3 {$ t: E
    83a4:        e1b05145         asrs        r5, r5, #2' D# Y, a4 Z6 E3 C- u( f
    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}  B$ |; _5 ?  x+ H; S6 B
    83ac:        e3a04000         mov        r4, #04 S4 Z' [: P/ Q6 J6 n* R9 V
    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]8 E+ n# D* K7 r' J' k
    83b4:        e1a00006         mov        r0, r63 n. l; ~  Z' s" \, X
    83b8:        e1a01007         mov        r1, r7
5 x. ]* j, f4 A) W2 W1 q, `+ N( q3 g    83bc:        e1a02008         mov        r2, r82 u6 t$ v( a2 Q" l
    83c0:        e2844001         add        r4, r4, #1+ X7 H4 v. L2 r/ P2 F! T2 M
    83c4:        e12fff33         blx        r3) U# [9 s! B8 {4 U9 V
    83c8:        e1540005         cmp        r4, r5
% R! W% e; W, X# {' T    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>
9 p' z3 [, x* X* L$ E: z    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}) w, q% `7 f+ r8 l" a0 }1 F
    83d4:        00008054         .word        0x00008054  U" P4 U# R- A" x/ U
    83d8:        00008054         .word        0x00008054
# T8 D6 v4 I, ]$ k6 h. Qnone:
  _) G: |1 X! D' Y+ k1 O4 X/ G1 |6 ?Disassembly of section .fini:- b" p3 V! g% j" U" j+ a

: J; L7 l& n- e, ~7 t0 h00008474 <_fini>:
; F. F2 m' g: }7 Q    8474:        e92d4010         push        {r4, lr}3 P2 F! N8 G/ O7 v' ?0 B8 ~9 l
    8478:        e8bd8010         pop        {r4, pc}7 D7 l6 y7 I: p* e
arago:6 Y1 F9 T* r9 V( S1 u
Disassembly of section .fini:
( v2 J; o5 [% j" L4 b! Y4 ~. y: R* n, ~
5 c) X  t# S: c6 m- {000083e0 <_fini>:& a; {0 M9 S) w5 e7 L6 L* b- \
    83e0:        e92d4008         push        {r3, lr}5 B/ ]9 w% F9 c/ X' o* R* s# i
    83e4:        e8bd8008         pop        {r3, pc}
8 ?. A" n, d4 d4 c2 z1 t8 j0 X- ~  }) k( T

  h8 W6 l, I6 h
* Z& X& T3 y8 t9 ^% e* m5 W; Q; V
作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。
, y7 ]7 v! H; l& m3 s1 W我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。5 x1 ^2 e* s& E* S4 d# `* w2 m
关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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