嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具
  Q4 Y' R2 E+ K+ `7 h7 Darago-2011.09-armv5te-linux-gnueabi-sdk: Z3 ^' I! _9 y5 @: i- f
arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu
' q! ?6 U* O) c: k这两个 交叉编译 工具 有什么区别  : _% E9 i1 c3 d1 d
1 y! Z1 R( @& @/ w' l2 W
8 g/ s/ J' s! |) }5 X6 U

作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好
1 O) ]. m, v/ y# A& {& Q. Q' E, Lhttp://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:03+ s! _4 g4 j+ Y
arago 对 TI 的支持应该更好7 g' h( K( c. K7 i$ U) @& [) ~
http://arago-project.org/wiki/index.php/Main_Page

( k$ F- Q& L; g3 G8 |# Z) o) B的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:- s" X, m: o9 p0 N4 s5 Q2 f! ]
  1 #include<stdio.h>                                                           9 Z$ K! S1 b7 I+ b2 N6 {2 ^& \
  2 #include<math.h>  ~$ q' V0 ~) H/ N# T
  3 int main(int argc,char* argv[])
3 A6 d' ?+ j- {* S  4 {
% o6 l$ d" l" @+ i# p: J  5     int a,b,c;( C" b# E2 W: K  z1 v* D" `! I/ \
  6     c = a * b;: N6 K' x5 ?/ ?4 k' x1 b- N5 c; @# A5 \
  7     return 0;7 B5 e8 o5 R, c* c- y9 C9 Z
  8 }  {2 i3 q, N8 h9 s. }( g8 ^

  j- v; H) h+ N* ]: L! C下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看
5 R: h8 [8 _  w  q6 Lnone:
. C. z! L7 T% D# r000082e0 <_init>:& ~5 Y9 r+ a+ W4 i
    82e0:        e92d4010         push        {r4, lr}3 H0 f" r$ V& Q9 h
    82e4:        eb00001c         bl        835c <call_gmon_start>
* {, y5 _$ r6 ]( ^: u    82e8:        e8bd8010         pop        {r4, pc}
$ z+ i* G* W& J3 H4 b# R2 ]arago:
/ ?. N& o( L% I00008250 <_init>:% C8 x9 ^# h9 M8 R
    8250:        e92d4008         push        {r3, lr}
8 N2 S5 k8 A* B# W    8254:        eb00001d         bl        82d0 <call_gmon_start>
$ l4 `2 j$ @6 U9 T% z1 X1 Y0 J; {    8258:        e8bd8008         pop        {r3, pc}, s! J  y0 Y" \3 V* T8 F4 G

! f$ L. ]) J& X$ u: e: Anone:0 j# v( U4 A/ u8 v
000082ec <.plt>:
( S  ^" y8 h: s4 H9 F' ]: o+ X    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
# m5 k+ r: g' [8 ?* j/ J    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>& X! B! E4 Z, w) o: v' f0 t$ p! m/ P1 Q
    82f4:        e08fe00e         add        lr, pc, lr
# J$ q/ R1 G/ {9 N4 v/ B    82f8:        e5bef008         ldr        pc, [lr, #8]!
1 |9 m8 Z: U. D0 y# {7 c    82fc:        000082d4         .word        0x000082d4
2 `1 t5 ]3 Q6 k, C3 Q9 U    8300:        e28fc600         add        ip, pc, #0        ; 0x0# G# ?! b2 W3 E" I' P
    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000! V; h4 Y4 U/ ?7 r% ^6 c
    8308:        e5bcf2d4         ldr        pc, [ip, #724]!
& N, l8 @( }! @! M! q1 X    830c:        e28fc600         add        ip, pc, #0        ; 0x0
3 t. b: E. R. B+ L8 @    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000
: b( C% W9 B# f9 K    8314:        e5bcf2cc         ldr        pc, [ip, #716]!! q0 n+ K- C8 ]
    8318:        e28fc600         add        ip, pc, #0        ; 0x0, e# w2 o6 L3 E' `$ E* z# V
    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000* q- q6 v+ X% @
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!
* G& t1 y$ @& O4 rarago:* c0 _3 _- C4 K1 h/ q. ?# h# f0 _
0000825c <.plt>:
! z( |! Q$ x6 |7 S! R9 z! x4 R  B    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)/ D, c. ?# Q1 \7 o' V; x6 X2 m' R
    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>
$ _, W* F" f6 G3 H! a8 n7 n, D    8264:        e08fe00e         add        lr, pc, lr
$ E+ v4 Y+ _; o" M3 N9 O' T    8268:        e5bef008         ldr        pc, [lr, #8]!
* v- I6 |1 Q; W+ y  m; c  |    826c:        0000827c         .word        0x0000827c
# Z7 I. \; u% b# h! D" e5 K    8270:        e28fc600         add        ip, pc, #0: B# n9 b% u& ?$ k
    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
* J( r7 B3 w; H9 r- o% Y    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c; K* {  r- X/ x( a7 `; m" L( o, i
    827c:        e28fc600         add        ip, pc, #0
. C8 X3 x' D9 x. W. k1 O% D! d    8280:        e28cca08         add        ip, ip, #32768        ; 0x8000
- [, E( K5 _0 ?' |    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274
* u+ r/ O$ H. x/ m4 D' {, f    8288:        e28fc600         add        ip, pc, #03 C# S/ i' F) C  F( ?
    828c:        e28cca08         add        ip, ip, #32768        ; 0x8000
- ?  @2 C' V$ @2 _* e  H6 k% W    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c) N- z& q$ T0 {+ s! }% @& u
none:7 T0 l, z/ G  P( P3 {1 |
00008324 <_start>:
( c  o! m' p, h4 w" k( ~; L    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>
& {+ B3 w5 B, M# i2 M  p) B    8328:        e3a0b000         mov        fp, #0        ; 0x0
) U+ |7 S6 N0 D& }% h5 _4 G    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)2 j2 _/ J5 B4 A
    8330:        e1a0200d         mov        r2, sp
. M% ]( D9 w( Y& }% R9 ?% O! Q    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
3 S( R5 e4 r$ H    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
% C- [4 q) {: K; l  W) s    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>
- w% t. C/ R0 C7 q- A    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>: U! `3 B8 ?" `4 z# X: e
    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)
( Z! T' i  m; w# J$ W8 [+ B4 v    8348:        ebffffef         bl        830c <_init+0x2c>
1 ^' r" W8 {6 x& V) A! n' u    834c:        ebffffeb         bl        8300 <_init+0x20>1 e2 Q$ c/ F, d9 T
    8350:        00008404         .word        0x00008404) ^, Q: V% o- O( o7 k+ p
    8354:        000083cc         .word        0x000083cc
9 s% \; @) c6 z" d4 z) @: x; b    8358:        00008408         .word        0x00008408
7 ]  \0 b: _! yarago:
% d, X4 L' v( `) z1 X1 Z0 C& B00008294 <_start>:( h2 R( h- q% j
    8294:        e3a0b000         mov        fp, #0$ g- {/ c, F8 `& G! s. j6 q- U) H: S
    8298:        e3a0e000         mov        lr, #0
7 k, x1 B3 A4 `+ e% z4 V3 x    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
3 S" L2 {1 b. j8 `/ [) l% w  b* G    82a0:        e1a0200d         mov        r2, sp
( O: t6 ^2 i  u' I0 }% H    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
3 U6 r2 v+ h- {( d7 U3 G    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
4 t, X( E+ i7 e5 u    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>
3 _; k& g& V# d    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)* q* L* H; R+ P! R8 a  a
    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>! ~+ S9 W. L: M3 g0 g
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>
* z7 [  h& \8 |% a2 Z) [    82bc:        ebffffee         bl        827c <_init+0x2c>
6 x( {' M' o, I/ V' R! w& }$ K2 }    82c0:        ebffffea         bl        8270 <_init+0x20>8 w( ]) J0 G, U3 y' u# x
    82c4:        000083dc         .word        0x000083dc2 S' }0 w( t& O: k6 u
    82c8:        00008344         .word        0x000083441 c& O' p4 C! `2 Z( k; ^0 H; T: I
    82cc:        0000837c         .word        0x0000837c" H0 P8 z$ S) }0 T0 B2 {' H
none:
- J" T3 Q- P7 S# `0000835c <call_gmon_start>:0 v8 `! w* e. U
    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>
' \* Q2 h. f, V( F  B+ E) H    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>
, ^8 R5 ~& f1 u( N% ~7 v    8364:        e08f3003         add        r3, pc, r3) d, I7 K/ s% O( z. K/ B8 m2 i
    8368:        e7931002         ldr        r1, [r3, r2], A9 m- m/ ^' O. Z# X
    836c:        e3510000         cmp        r1, #0        ; 0x08 Y2 E; \$ _: i" w; K/ X2 Z# ^
    8370:        012fff1e         bxeq        lr- G5 k; @) ^: i  J/ {) z! l' U
    8374:        eaffffe7         b        8318 <_init+0x38>& i# Y: v+ O! ~. i. f- A, X( j
    8378:        00008264         .word        0x00008264: V: \0 D4 @" v1 P1 l
    837c:        00000018         .word        0x00000018  v2 z5 ^+ W. m, w- j% }
arago:3 M, \2 v/ N4 o0 R4 V! \# S
000082d0 <call_gmon_start>:1 C7 M$ [  a7 t# w! `. ^; b
    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>% x( X1 B( N8 t* R" K
    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>0 m# _: }2 I' y; _
    82d8:        e08f3003         add        r3, pc, r3
+ V/ y4 Q# o! S3 G: q    82dc:        e7932000         ldr        r2, [r3, r0]; K; E! S* j4 g
    82e0:        e3520000         cmp        r2, #0/ x6 n! [. i6 w. \% s, V% O
    82e4:        012fff1e         bxeq        lr
- t5 h" L) ?$ d5 c    82e8:        eaffffe6         b        8288 <_init+0x38>
) _! C" f  a; K$ y8 s    82ec:        00008208         .word        0x000082085 R  ^, }  I" l' R
    82f0:        00000018         .word        0x00000018
, t: o7 _, c, i, F" n0 Onone:7 `0 [, x/ v2 z3 Q  H8 D0 d) M! v
00008380 <__do_global_dtors_aux>:
5 v; F/ V0 w6 I1 B5 J% H  @    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
2 b$ T1 S$ P" k4 Q' k6 g    8384:        e5d23000         ldrb        r3, [r2]
; _2 n1 S8 R, e8 q) t3 ~3 c9 Y    8388:        e3530000         cmp        r3, #0        ; 0x04 Y% g: e% u  E# ^
    838c:        03a03001         moveq        r3, #1        ; 0x1
3 f* J  |3 D5 b( i( L, z' K8 g    8390:        05c23000         strbeq        r3, [r2]
6 X& o7 G( g7 \! J. G' ^    8394:        e12fff1e         bx        lr
3 ^/ D3 t* q. n* A    8398:        000105f4         .word        0x000105f4) B! e8 b) M6 X# W
arago:
& U( u% \2 \* k4 D8 N000082f4 <__do_global_dtors_aux>:) k& s. d- I# m+ ~/ V/ D9 k0 e/ M
    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
' ^' N) A/ E/ E% U( Y    82f8:        e5d32000         ldrb        r2, [r3]
$ q0 X& u9 j# P8 d5 `    82fc:        e3520000         cmp        r2, #0
6 `6 l4 S# Q6 y    8300:        02822001         addeq        r2, r2, #1
; ^0 }3 w, Z8 @  d  M7 ~" ?    8304:        05c32000         strbeq        r2, [r3]
) K6 {, e2 Z9 D3 r8 J    8308:        e12fff1e         bx        lr
4 W- ^- D7 ]7 D. C" F6 F4 h    830c:        0001050c         .word        0x0001050c
) s% e5 E) I4 a+ {8 q6 m8 znone:
( S0 }% F, d$ }5 d' y) L0000839c <frame_dummy>:! j  Z  f! G& ^7 r% a) Q4 y
    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>. v' W0 c+ ^# ?, W
    83a0:        e92d4010         push        {r4, lr}
- L$ i* B' j' ^6 ^( n2 k+ E8 t5 t    83a4:        e5903000         ldr        r3, [r0]
# t# F# U8 u# L9 M    83a8:        e3530000         cmp        r3, #0        ; 0x0
3 k! x9 _0 z  j    83ac:        08bd8010         popeq        {r4, pc}
& r( @. E+ W- b! q9 }" p    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>  p8 L6 i0 B1 P9 o/ c: M
    83b4:        e3530000         cmp        r3, #0        ; 0x0
0 k" `! F( p# N$ E" g    83b8:        08bd8010         popeq        {r4, pc}# s4 |5 |0 N  I( U6 b0 S" K* ]
    83bc:        e12fff33         blx        r30 ]+ z9 l* o0 q1 |8 `9 u  v
    83c0:        e8bd8010         pop        {r4, pc}* D5 d+ u( t! B6 E8 l; W( {1 u
    83c4:        000104dc         .word        0x000104dc1 ?# w0 @! ^# a1 Y& O/ K0 \- ~
    83c8:        00000000         .word        0x00000000, f4 I1 u/ U' s. a) k  Q  w) r' S
arago:( x& h7 r: G) E, k; G) u! l9 D
00008310 <frame_dummy>:
8 W! ]& o4 y6 T. I6 U    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>
# R  k# m" p2 X& b  m( t, j    8314:        e92d4008         push        {r3, lr}
8 q5 A0 W' ~6 m$ w    8318:        e5903000         ldr        r3, [r0]' Q* I0 H' [  N1 b
    831c:        e3530000         cmp        r3, #0
, v( H: @' z4 h+ m8 w# V4 r    8320:        0a000003         beq        8334 <frame_dummy+0x24>. H, c7 g0 B% a' _% f. h
    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>; R+ g# v6 k; `* ]; b& O' J3 M
    8328:        e3530000         cmp        r3, #07 d% m# O' Q, q; }8 X; s  U
    832c:        11a0e00f         movne        lr, pc
2 ?* j% b& X) {+ q" M8 M    8330:        112fff13         bxne        r37 k& f5 @6 M( [2 m% ~9 Z
    8334:        e8bd4008         pop        {r3, lr}% D' @& S1 C, d  w5 W  ]/ s* v
    8338:        e12fff1e         bx        lr9 X" k0 m; Y1 A. Y- }
    833c:        000103fc         .word        0x000103fc
* \! q- Z8 J" s4 }& \; J" N    8340:        00000000         .word        0x000000007 V' |  K6 b9 k" G, e6 q/ P
none:+ W" {1 V5 T. r- n
000083cc <main>:" a& O& }2 c, A! v  _: H
    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
+ z6 N7 |1 L2 z4 V- V  b7 r& N    83d0:        e28db000         add        fp, sp, #0        ; 0x0
3 C4 P7 D! H2 K- J  Y$ M2 u5 E    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c
0 d$ _6 }: j7 d; J: J+ c( i2 o1 d    83d8:        e50b0018         str        r0, [fp, #-24]
6 D0 B) l( d# S# @    83dc:        e50b101c         str        r1, [fp, #-28]
3 S% j% J: r- |  L& I    83e0:        e51b2010         ldr        r2, [fp, #-16]
9 o/ _+ _+ e( p% j# L% g) Q$ M: P" P    83e4:        e51b300c         ldr        r3, [fp, #-12]% z0 b; y$ N8 z( H6 h
    83e8:        e0030392         mul        r3, r2, r3. G6 u# I# X) U8 k
    83ec:        e50b3008         str        r3, [fp, #-8]
* U& F' d( @: V+ F- n3 C& n. }( {    83f0:        e3a03000         mov        r3, #0        ; 0x05 ^2 Y% e) F# q0 f8 \
    83f4:        e1a00003         mov        r0, r3
5 g' Z3 t1 ]3 n2 }0 J5 _    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
  o6 K- p) q. j) ~    83fc:        e8bd0800         pop        {fp}
& |3 J# @6 p8 d3 R    8400:        e12fff1e         bx        lr; K2 I# x+ i; y( k9 s
arago:; o# h" B5 w/ u9 @  r$ V0 I: w: F
00008344 <main>:7 M9 [$ }0 j5 c& h- J$ U
    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
' K& W+ }8 K: w4 f. ]' Q: i9 D+ k6 x    8348:        e28db000         add        fp, sp, #0
5 T' j) b4 N( [7 n    834c:        e24dd01c         sub        sp, sp, #288 D0 M& l6 x6 l2 M2 B  p% f
    8350:        e50b0018         str        r0, [fp, #-24]
; o4 v0 j8 V8 N9 v    8354:        e50b101c         str        r1, [fp, #-28]2 r& [% p" F( }  C6 z: R0 m
    8358:        e51b3008         ldr        r3, [fp, #-8]
" T. J6 N4 i8 a3 @' J& O' {    835c:        e51b200c         ldr        r2, [fp, #-12]7 s* n6 b: Y9 c' S0 p0 y; T7 N
    8360:        e0030392         mul        r3, r2, r3" }" n7 _& j1 J) ]0 v) p/ u
    8364:        e50b3010         str        r3, [fp, #-16]
/ D# |  O, X; v    8368:        e3a03000         mov        r3, #0! E6 R7 Z9 w' u! k2 `' A
    836c:        e1a00003         mov        r0, r3
3 w+ F/ w0 Z2 |3 T    8370:        e28bd000         add        sp, fp, #0# g9 }2 T6 z& q* s5 a
    8374:        e8bd0800         pop        {fp}. _9 S' Y& j+ `! V# e9 [
    8378:        e12fff1e         bx        lr
9 T4 u3 C5 R6 q9 I. h' F+ Ynone:3 }/ v  {4 `6 I- Y
00008404 <__libc_csu_fini>:
  W' N6 G: @% R% U    8404:        e12fff1e         bx        lr& q; X' H% g" s0 g, k
arago:
( l1 J  r- W* f0 S4 Z000083dc <__libc_csu_fini>:
8 i  t. ]. z0 e( t    83dc:        e12fff1e         bx        lr: N" u1 {2 X+ r& W/ F6 m1 C
none:, F( u" h' w; g  Y" g8 m- l; B( S* t
00008408 <__libc_csu_init>:' K' q$ T# f& b( M
    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}
' K+ b6 }& l  `# S+ S4 W" P    840c:        e1a08001         mov        r8, r16 ~. E. Z, W! `( K
    8410:        e1a07002         mov        r7, r2
% T$ b5 D1 g0 t; N    8414:        e1a0a000         mov        sl, r0
8 d* ^3 Y3 Q- e% r9 c    8418:        ebffffb0         bl        82e0 <_init>/ [8 P3 k5 {: L5 C- I, M
    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>
/ O6 Z: G( ^. S+ I5 R) l4 P5 k  a    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>
3 `0 _3 O, [3 O. I  F% U6 S4 E; ~    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
) B: w$ y$ u* D  g8 \: F4 [) K    8428:        e0613003         rsb        r3, r1, r3
5 H/ q+ F1 W6 X% w1 i3 D    842c:        e08f2002         add        r2, pc, r2
; G/ {9 v1 J7 c! t  P    8430:        e1b05143         asrs        r5, r3, #2
. J4 Z1 F) K. d3 z    8434:        e0822001         add        r2, r2, r1
: }! m$ s8 ~/ {$ Z+ j0 E    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}
2 k& t3 L$ s% I    843c:        e1a06002         mov        r6, r2
" n' M9 b) Z! `/ r7 m, X1 p& s    8440:        e3a04000         mov        r4, #0        ; 0x0) g% i# S& i+ r
    8444:        e1a0000a         mov        r0, sl& v- [% r. [/ n. k2 ?* Q# i' J  g
    8448:        e1a01008         mov        r1, r8
+ f* n% _5 F- _; e    844c:        e1a02007         mov        r2, r7$ H2 N! ^# c/ N# Y" O0 I
    8450:        e1a0e00f         mov        lr, pc1 c% i8 T& v" |8 F
    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]! |  t- x# k( C+ g$ l! q' l/ f) v7 k
    8458:        e2844001         add        r4, r4, #1        ; 0x1
7 i& I; I2 E( N, ^, F    845c:        e1540005         cmp        r4, r5
+ K; Q3 n. @; L) ^; g+ Z1 s    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>
- m/ e* Y! I( t    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}, E! l; e7 o* S
    8468:        ffffff04         .word        0xffffff04
) f- k; L4 d2 A+ f    846c:        ffffff08         .word        0xffffff08
; Q: Q4 j- Y) c2 o( V( e3 d    8470:        0000819c         .word        0x0000819c( b- {# F5 ]8 c' u5 T/ x. x, I/ ^/ o
arago:" |" i) ^) g! Q, I# K4 ]
0000837c <__libc_csu_init>:
8 _" b  d2 f4 t4 Q    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}) q+ Y$ r' d. k1 B2 ^: t% Q( d
    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
% F& K* e* g* ?  e; z    8384:        e1a06000         mov        r6, r0  ~+ X0 ^7 Z2 A6 }# u% d$ M6 s$ e  r
    8388:        e1a07001         mov        r7, r13 Z& u+ l4 i1 F% b9 @8 p9 ]. Z
    838c:        e1a08002         mov        r8, r2
- `6 n* B, \$ z! Z! W    8390:        ebffffae         bl        8250 <_init>; t8 {  }% n5 U0 ^* N5 X
    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>
0 K6 X6 F1 }. x' ]    8398:        e08fa00a         add        sl, pc, sl
# A. ?( ^$ ^; u    839c:        e08f0001         add        r0, pc, r1* B- q9 [3 X6 O0 u, Y- T& |2 s
    83a0:        e06a5000         rsb        r5, sl, r0
6 R6 l/ S- {: U* b    83a4:        e1b05145         asrs        r5, r5, #2
' T( c% \! l. M8 T0 Q: l! C3 J    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}1 l* k' l) A7 P% d3 j
    83ac:        e3a04000         mov        r4, #0
6 U5 D& ?  w1 S+ h5 Y3 @    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]
$ P- l" y4 r5 G6 q4 i5 \2 X* t- S    83b4:        e1a00006         mov        r0, r6$ i, f7 {6 S$ x! v9 {
    83b8:        e1a01007         mov        r1, r7, P  K/ H( c* M9 ]
    83bc:        e1a02008         mov        r2, r8
8 C  T: Z( u! [' P$ m- `: d8 l" k    83c0:        e2844001         add        r4, r4, #1
' h9 x) A# q) {6 B, m    83c4:        e12fff33         blx        r30 M! E7 b3 J/ C. B" z0 S
    83c8:        e1540005         cmp        r4, r5
. @5 [: q5 W  `; |    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>2 q, q( E) q' K2 P" K& K; u" j
    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}
5 X: i0 {- O" S2 r. M+ U    83d4:        00008054         .word        0x00008054. Y4 o- w9 A; j3 Y
    83d8:        00008054         .word        0x00008054
: B' Z( P4 u" J4 Y. e( knone:
+ q- ^  `0 v1 u6 z) g' w$ w& N9 oDisassembly of section .fini:/ z7 S3 x  P- l! f* N
9 l' `( W) o% h
00008474 <_fini>:1 I8 U+ Q7 u  _' x/ A
    8474:        e92d4010         push        {r4, lr}
5 @0 G& y6 `* l    8478:        e8bd8010         pop        {r4, pc}
' U2 |; ^, q+ harago:3 j6 H* ]  @( t+ P0 X
Disassembly of section .fini:
  @$ a& e! `$ e% A
, l/ n( v  O- {! F$ y3 Z000083e0 <_fini>:
& u# l9 f& b$ r& T7 G2 N    83e0:        e92d4008         push        {r3, lr}
$ \$ E$ N  ]  w8 i- Q) A6 V    83e4:        e8bd8008         pop        {r3, pc}. `8 }9 p% }) r/ l  _8 k* X
1 Y  F5 K0 `( ^' K' L4 y

1 J% k4 I0 l; v! c
/ L' ~' M& _! K4 Z
作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。3 z6 ?0 [& _- Y" Z6 N& F
我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。
& X" m6 t3 @7 u1 J; D# o0 a( x关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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