嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具5 a. r9 ~5 u4 g0 z% @& ]
arago-2011.09-armv5te-linux-gnueabi-sdk) V3 q, I, s" H+ G
arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu
, V2 P/ ~4 S, d这两个 交叉编译 工具 有什么区别  
4 K, ^2 |/ l+ z! G0 {1 l0 w+ C2 i- r

7 y; L6 ]! ~: c+ P, P
作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好/ |3 ^/ F' x, }7 z2 V9 }
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:039 S7 u- c( d; e1 n* `0 o
arago 对 TI 的支持应该更好
% s  ^: }( w# b1 w4 R2 Rhttp://arago-project.org/wiki/index.php/Main_Page
& g' X/ l! ?! `) U
的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:) k: W2 Z7 H: J8 e
  1 #include<stdio.h>                                                           $ z" b% D4 X& {( I9 U( _
  2 #include<math.h>4 n7 A) E8 p9 j1 A; I9 N1 f6 H
  3 int main(int argc,char* argv[])
/ x: S) h; V$ j5 f* u) I% n4 X0 ?  4 {% H( {. Q" B9 X' k- C
  5     int a,b,c;
: E( h7 d# }" Z5 @& b! w  6     c = a * b;
( r5 \  o* a9 w8 X: C- {( G; v3 t" s  7     return 0;( P  f& s: R# g2 s6 m$ g  ~
  8 }" l" A3 ]. W: I, v" R6 S2 ~2 R

* o( e& J# F7 `: _, `7 g# j下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看
# M" h9 q) K3 q! e5 Lnone:
4 ^) t3 \: ~9 [* j3 k# g3 `000082e0 <_init>:; ]$ P# r9 \' ?" {6 v& @
    82e0:        e92d4010         push        {r4, lr}
  K" y$ F2 S6 W0 w5 x    82e4:        eb00001c         bl        835c <call_gmon_start>, Z( e+ q# y5 @' j
    82e8:        e8bd8010         pop        {r4, pc}
  S6 w$ v  p% Garago:
- E4 G6 [6 f# G. X0 B00008250 <_init>:
0 B& \8 J7 D( T$ R+ L5 T    8250:        e92d4008         push        {r3, lr}
) H5 b# \7 ]3 |' v5 u7 B    8254:        eb00001d         bl        82d0 <call_gmon_start>  S1 L5 u$ j2 P0 r/ j: T0 q9 X
    8258:        e8bd8008         pop        {r3, pc}
# v% j, Z# C6 r: y! W; l
: a3 N! Q% a+ @- s* Snone:& u( K$ k# B- m* X% l' D
000082ec <.plt>:
6 X$ @' c& v$ |' B% w1 \* h6 k    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
; k3 R' i# m; J/ B$ ~. y    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>
3 G$ J- S3 e% T    82f4:        e08fe00e         add        lr, pc, lr
% P, }# u' E7 l    82f8:        e5bef008         ldr        pc, [lr, #8]!7 T+ P9 `' ]+ v5 b" G- [
    82fc:        000082d4         .word        0x000082d4% g& d; p* a& z; n3 b6 ]
    8300:        e28fc600         add        ip, pc, #0        ; 0x0
1 _2 V7 H5 B: u# O* ~+ h    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000/ v) z6 _+ @8 O+ Z1 s5 t
    8308:        e5bcf2d4         ldr        pc, [ip, #724]!8 i4 W1 R+ ^/ _" c; r; C
    830c:        e28fc600         add        ip, pc, #0        ; 0x0
* v# ^/ i: R4 j6 d+ u! |0 i2 V    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000
/ p+ g5 P  p. D1 i. p0 O    8314:        e5bcf2cc         ldr        pc, [ip, #716]!7 ?( P: a! R' b8 n; Z
    8318:        e28fc600         add        ip, pc, #0        ; 0x0; D* L( w5 U/ g' L7 V
    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000- |$ R2 R  @7 r' N
    8320:        e5bcf2c4         ldr        pc, [ip, #708]!
1 b5 f/ o7 D! garago:, b3 ]- d4 J6 ~. Z" ]# \
0000825c <.plt>:
, l" `9 x1 x- X- d4 `    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
$ X& S# G8 T- m    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>
2 b0 R. |& I- `: l% g! ]/ [. K    8264:        e08fe00e         add        lr, pc, lr
& `' O2 s: X1 {9 l( G) l8 b: l    8268:        e5bef008         ldr        pc, [lr, #8]!; Q0 o/ U' j5 l4 Q9 l& k8 J) P
    826c:        0000827c         .word        0x0000827c
+ V  U6 D; |. l% N+ B/ v7 ]* _5 ^    8270:        e28fc600         add        ip, pc, #0
- q& l, ?! Z$ \5 b+ I' S$ C$ w7 H( [    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
/ a3 h) i. |7 b, M2 o8 j    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c
" u/ V/ S2 V0 j% x3 @    827c:        e28fc600         add        ip, pc, #0
3 Z2 }7 `. m1 z  w: M1 \6 J% j    8280:        e28cca08         add        ip, ip, #32768        ; 0x8000+ ^! q+ q6 E; h1 }, X6 o
    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274" D% u) g, R$ |3 W- d
    8288:        e28fc600         add        ip, pc, #07 P: q; F& y! _# R- h' p
    828c:        e28cca08         add        ip, ip, #32768        ; 0x80003 c$ r  N( [. m9 `6 R
    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c
, D/ V2 I8 P* O5 J2 s) ^1 {none:
: h6 E+ E. ]3 i8 [9 f  _& n7 A00008324 <_start>:  n8 Q$ y; K9 k
    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>. e2 \/ F, g1 |9 A" U
    8328:        e3a0b000         mov        fp, #0        ; 0x0
5 P/ {. Q. I" y; H    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
: z% P' E$ r4 r$ C/ F% ^4 a; S    8330:        e1a0200d         mov        r2, sp
2 l4 F# J9 Q$ }4 Y; `    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)
( I5 Q' f; @/ e: v    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)2 @' J1 R; @7 _! _+ q# U: l
    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>2 Y  b7 Q) |$ M/ I, p8 g
    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>
/ C& z& s5 v/ m0 E( y. b. \- ^) d    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)0 V+ u9 Q7 j2 L
    8348:        ebffffef         bl        830c <_init+0x2c>2 W( y% E' ?5 ^+ B
    834c:        ebffffeb         bl        8300 <_init+0x20>
* f: O4 P. O0 E& |! {# p, Z    8350:        00008404         .word        0x00008404, u+ w$ |- z/ _+ X6 x+ s
    8354:        000083cc         .word        0x000083cc
1 z0 T9 y' |( }! {" S; D    8358:        00008408         .word        0x00008408- y* Z2 U" ^* Q$ H' H# t1 B
arago:% T* O7 y4 h. R# h0 c* O; W+ E
00008294 <_start>:* o# L! E  y* L& f
    8294:        e3a0b000         mov        fp, #0
+ x) D& w  \/ _1 k    8298:        e3a0e000         mov        lr, #0
( a3 n( k- l# E; {8 }7 x    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)2 C1 K% L6 `* |; Q0 I* {: T. Z
    82a0:        e1a0200d         mov        r2, sp
8 A/ \6 o! W5 T2 l  f    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)2 i- i) l5 P: z
    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
1 s7 }; ]! p, C    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>
9 H6 R: _4 Z- R  [0 ]/ }    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)
" V. z7 o0 U5 W. @% Y  b6 T    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>* d) R" r8 Y4 N- N# M& D6 L6 A
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>( }$ f# e. _  f% Y& ~% i
    82bc:        ebffffee         bl        827c <_init+0x2c>
: M& ~1 l- I* R    82c0:        ebffffea         bl        8270 <_init+0x20>
6 Y  h4 E& S* p3 z% s5 I! Y$ A9 v1 @    82c4:        000083dc         .word        0x000083dc
7 m* @9 N0 S3 ?! L/ k5 y1 F: t    82c8:        00008344         .word        0x00008344
+ G, B% _& P. R$ s# W/ W& `0 H    82cc:        0000837c         .word        0x0000837c
. R$ I* k  G5 Y  ]none:4 R8 i- t+ U% C0 v# P7 Q# Q
0000835c <call_gmon_start>:$ L7 k. O, s, Y$ }
    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>, {2 `+ Q  j; E5 w- d* B
    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>' E& Q) s2 o1 D" T) q' O
    8364:        e08f3003         add        r3, pc, r3
6 E, N7 J, ?; K9 h! ], Z+ j    8368:        e7931002         ldr        r1, [r3, r2]/ G$ E/ I2 ^% b* u, G! G# l
    836c:        e3510000         cmp        r1, #0        ; 0x0
7 K! M$ ?2 a, m, _, t    8370:        012fff1e         bxeq        lr- u# o  w+ ?9 T& T: o  N# H0 |8 q
    8374:        eaffffe7         b        8318 <_init+0x38>
, \/ q, o$ H( v* z4 @( B2 u" M    8378:        00008264         .word        0x00008264. A# q2 G* Q- a0 b
    837c:        00000018         .word        0x00000018
! ^7 C1 [* n; jarago:
2 P4 p$ \4 N$ P000082d0 <call_gmon_start>:
. @/ t0 v% U) p( c% `7 ?2 Y    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>6 U" }' i. e  D
    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>* T) b0 ]- H6 o! E
    82d8:        e08f3003         add        r3, pc, r3
; h6 L0 x! ^$ H3 l    82dc:        e7932000         ldr        r2, [r3, r0]0 g4 y% |/ w, z) N, }* D; x
    82e0:        e3520000         cmp        r2, #0% X. X: E, I/ r' I- N. t) R
    82e4:        012fff1e         bxeq        lr/ Y* I/ y( ]. P" \& U
    82e8:        eaffffe6         b        8288 <_init+0x38>: ^  a3 _6 U) [( u4 t1 N  |2 s
    82ec:        00008208         .word        0x000082084 S  F7 }; x: B4 \9 m& ?
    82f0:        00000018         .word        0x00000018
$ c3 x5 p8 R2 c. t% Z$ _! Vnone:
. k8 j7 u' q3 X; i00008380 <__do_global_dtors_aux>:. o5 I4 X! V8 q* i% j6 }
    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
# z- N" h7 T. \0 h& k    8384:        e5d23000         ldrb        r3, [r2]; p& m5 |. E/ Y3 {
    8388:        e3530000         cmp        r3, #0        ; 0x0( K. |9 l2 U" v7 Y5 m# \
    838c:        03a03001         moveq        r3, #1        ; 0x1
- r- T. M$ m7 d9 G    8390:        05c23000         strbeq        r3, [r2]
3 ^; k2 m# \2 i    8394:        e12fff1e         bx        lr2 i2 y* u+ U4 [# p/ Z' m' r' h
    8398:        000105f4         .word        0x000105f4& W, t3 d3 D5 [% m; P7 \8 Q
arago:
$ j/ C! D+ x& i- ~4 ~000082f4 <__do_global_dtors_aux>:
9 V7 |# r0 |/ @8 Y: R7 }# w1 T9 t    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
5 U! x$ N. I, T9 k, V! ?* c    82f8:        e5d32000         ldrb        r2, [r3]
% s% s  a4 G# S' g    82fc:        e3520000         cmp        r2, #0
2 |, s9 K' V9 D) u: U2 k" O    8300:        02822001         addeq        r2, r2, #1
6 r( S# V3 d' f    8304:        05c32000         strbeq        r2, [r3]/ D) ^8 Q* X$ B% `
    8308:        e12fff1e         bx        lr
$ Z& ?  p7 L+ f8 L    830c:        0001050c         .word        0x0001050c
$ [6 l+ w0 {2 b: X2 a9 gnone:& K6 z9 j! I" D* ~( b! X
0000839c <frame_dummy>:
5 h0 ~: _! Z4 D  y    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>- ?5 g2 P. @# c, k$ y5 I8 N
    83a0:        e92d4010         push        {r4, lr}
  O6 ^2 e( b  p0 Y# [* C; B    83a4:        e5903000         ldr        r3, [r0]5 f+ X3 U, S" k( I2 x& W8 n
    83a8:        e3530000         cmp        r3, #0        ; 0x05 g% c/ w: Y6 V$ ^2 ]6 C
    83ac:        08bd8010         popeq        {r4, pc}( B9 {0 D9 |: G+ W( w  [2 s
    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>
' m7 x, |! a) Q& A) m/ j2 u    83b4:        e3530000         cmp        r3, #0        ; 0x0
2 X6 H% j0 I9 _, L5 [( e- `" q    83b8:        08bd8010         popeq        {r4, pc}
9 f. H2 d, h) z6 ?2 v3 |5 o    83bc:        e12fff33         blx        r3
( r2 T( E2 m5 F, J    83c0:        e8bd8010         pop        {r4, pc}
( ^8 [5 i$ M  O3 ]7 t7 l$ n! P( r    83c4:        000104dc         .word        0x000104dc
7 {9 t% w& U) B* k    83c8:        00000000         .word        0x00000000
; J7 i: M) x: }$ i" {( y9 _6 Z4 farago:
/ V1 _5 q7 x/ w# z" e00008310 <frame_dummy>:  z, B4 F! \; {1 K9 o$ k1 M
    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>: o, u+ P& s, f8 h# a
    8314:        e92d4008         push        {r3, lr}! V1 t+ [: d9 y5 G& d! g2 k' k
    8318:        e5903000         ldr        r3, [r0]5 g# H% i* H6 \# `
    831c:        e3530000         cmp        r3, #01 c5 D* A& f1 |$ ~2 M7 O7 E* s
    8320:        0a000003         beq        8334 <frame_dummy+0x24>
: B" U- t% x3 Z6 r, z( O! n* @/ g    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>- ]$ z' N* s1 ?# y
    8328:        e3530000         cmp        r3, #0) W  s) {" {/ I
    832c:        11a0e00f         movne        lr, pc
% B7 c2 @( S+ _; U    8330:        112fff13         bxne        r3
( G, p0 M3 h2 L0 @+ p% J- N    8334:        e8bd4008         pop        {r3, lr}0 V6 A4 p3 t- i& ^
    8338:        e12fff1e         bx        lr
/ E* L' E, z4 a    833c:        000103fc         .word        0x000103fc
8 S5 g. i9 }* j( C% ~    8340:        00000000         .word        0x00000000- b( l' `2 G' Y; L2 v  w
none:. t" ^& e: q8 a* f
000083cc <main>:
$ y- K; I& C7 ~# V4 _6 T: t+ m$ A6 X    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
3 W6 P, B  g' l8 Z- R; a    83d0:        e28db000         add        fp, sp, #0        ; 0x0
( e3 j$ [1 y1 x8 d2 c+ u; h    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c3 w2 [0 ~& p# Q
    83d8:        e50b0018         str        r0, [fp, #-24]- t; K4 o2 N  }6 n: `
    83dc:        e50b101c         str        r1, [fp, #-28]2 p# p, s) m$ [4 |9 q6 P
    83e0:        e51b2010         ldr        r2, [fp, #-16]
3 K, A; e* m6 e    83e4:        e51b300c         ldr        r3, [fp, #-12]
' ~/ u! {' V1 F, S    83e8:        e0030392         mul        r3, r2, r3. w$ h0 _) Y" ]; K2 B% y+ _
    83ec:        e50b3008         str        r3, [fp, #-8]
: f" Y, A) t5 @5 ?    83f0:        e3a03000         mov        r3, #0        ; 0x0# X& P% G5 m: q. Y5 B
    83f4:        e1a00003         mov        r0, r3
1 d3 a* v- q, S1 E1 j, S! o6 ]8 L6 v) g    83f8:        e28bd000         add        sp, fp, #0        ; 0x04 T1 _9 H( k- K
    83fc:        e8bd0800         pop        {fp}
1 z7 c* o' C7 R* W/ S! c" C, f    8400:        e12fff1e         bx        lr* U# w9 n3 `* `9 b1 ]+ }! @' ]: @
arago:1 @: h, [' x; u  u
00008344 <main>:
5 u6 _. y6 Q3 r% j    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)
. s3 h4 S/ x$ R: y( |    8348:        e28db000         add        fp, sp, #0
/ ?# F- `9 H0 K9 s. O: f9 m    834c:        e24dd01c         sub        sp, sp, #28
  I" E) K9 q; n* a6 s7 X2 ~: v    8350:        e50b0018         str        r0, [fp, #-24]
) b$ y3 _5 e6 t! T5 B    8354:        e50b101c         str        r1, [fp, #-28]* L( P/ L. k8 K/ Q% s
    8358:        e51b3008         ldr        r3, [fp, #-8]
3 Z7 t4 f! ^0 v9 Y& r1 K- G    835c:        e51b200c         ldr        r2, [fp, #-12]" c6 Y' f* N* z! X9 ]2 @. ^
    8360:        e0030392         mul        r3, r2, r3
7 ~, j7 ?+ t, ?# n' i( G; ?  @    8364:        e50b3010         str        r3, [fp, #-16]5 m9 B1 C& i5 r$ y) `, {$ [
    8368:        e3a03000         mov        r3, #0
' {: O3 l7 s8 j  w/ O    836c:        e1a00003         mov        r0, r3+ O% M+ M, Z0 |" j3 ^4 s  C
    8370:        e28bd000         add        sp, fp, #0
4 U- G( D' i" s/ Y: @7 g1 E    8374:        e8bd0800         pop        {fp}; R3 I9 x. T( Y) u6 g
    8378:        e12fff1e         bx        lr
! V& z0 s- W' ?. e  K$ onone:
! R0 W) L& Y! k$ A) x1 X9 j' @00008404 <__libc_csu_fini>:+ E- P( \1 K( Z1 t. c& k; M0 m
    8404:        e12fff1e         bx        lr
' n' f. q8 L: Earago:9 e4 ]# V# t: R% S9 s) f
000083dc <__libc_csu_fini>:
. ~3 Z+ C) w& o3 B2 E9 f    83dc:        e12fff1e         bx        lr
" m% ^+ H! m7 [2 R- w' G' onone:. X) p4 r0 L- O1 r7 B' Z  Z
00008408 <__libc_csu_init>:( m' X9 ]8 r" w  a! H; V8 \
    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}
* _: _( N5 }. u( P! }  \5 [4 S    840c:        e1a08001         mov        r8, r1& C( x' I$ g. L: H0 u6 I+ J( G
    8410:        e1a07002         mov        r7, r2; C& W6 P) A) C1 Y$ f% ^2 d+ m* [, x
    8414:        e1a0a000         mov        sl, r0, X+ R2 I' ^' b/ o' K4 V
    8418:        ebffffb0         bl        82e0 <_init>
6 _# P' p) W" y9 z' o: i) ~8 B    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>
' \- S+ u# o+ R' K# }  t5 _    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>" a* V# ~. ?( Y% Z- p) {
    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
& ~; |1 J4 }' _; t' E- J* t    8428:        e0613003         rsb        r3, r1, r37 }3 _4 h. k; x: a0 o
    842c:        e08f2002         add        r2, pc, r2& T. t) P: ]% N
    8430:        e1b05143         asrs        r5, r3, #2
9 L/ A4 b' n2 B7 j% \0 r9 A    8434:        e0822001         add        r2, r2, r1
0 t5 P9 N" E" D" u, u    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}
" C6 P7 [2 O0 X- A9 @+ [: n    843c:        e1a06002         mov        r6, r2
" r* l6 p" B  y( \. Y9 T! j6 x: J    8440:        e3a04000         mov        r4, #0        ; 0x0  T1 H+ N- l0 h8 \; C
    8444:        e1a0000a         mov        r0, sl' k) \7 a, T) j% w0 h
    8448:        e1a01008         mov        r1, r8* C" }1 `7 L% L) o0 V6 Q
    844c:        e1a02007         mov        r2, r7
+ i  i( [' |$ ]. r& \% E; ^    8450:        e1a0e00f         mov        lr, pc
* [* p. I9 w* r7 K; j* `' u    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]
1 q0 j6 a' f2 ~# T+ N0 N    8458:        e2844001         add        r4, r4, #1        ; 0x17 T) ^) n- K7 t5 O* i8 L+ f; [$ `
    845c:        e1540005         cmp        r4, r5
$ E! y: a* `* {- p4 y- o    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>" ?% h9 P! w  G' u0 c
    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}
8 \7 L- j- z2 `1 P1 T5 N, i  ^+ _    8468:        ffffff04         .word        0xffffff04
, x6 x+ ^) ~, b    846c:        ffffff08         .word        0xffffff080 ^8 ~4 s3 e( M( z% D
    8470:        0000819c         .word        0x0000819c+ \7 k# p& R* d! V% K* R- o. \
arago:) D* J# ?7 x3 y8 ^/ A
0000837c <__libc_csu_init>:
& F. j6 s( X4 l3 ^9 Z. S    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}; p6 P$ T% l; t' _' o7 Q+ Z
    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>0 x6 J& F- n" q- x
    8384:        e1a06000         mov        r6, r0
/ m8 R( c) l7 L6 F" V. F    8388:        e1a07001         mov        r7, r1
/ j3 r1 N$ R; W# c9 b+ z) ^; i    838c:        e1a08002         mov        r8, r2
8 I4 e2 C# R+ f' o; E3 \    8390:        ebffffae         bl        8250 <_init>' R5 u% o9 @8 j' U# k- H. A
    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>
' _! S% S% d$ E    8398:        e08fa00a         add        sl, pc, sl% t6 C7 p  l3 H3 c9 l, \
    839c:        e08f0001         add        r0, pc, r1' X2 S5 h3 p# d0 r9 `
    83a0:        e06a5000         rsb        r5, sl, r0
" u3 }2 I* o# x3 ^' Y8 J0 a    83a4:        e1b05145         asrs        r5, r5, #2
4 G: F+ `4 D: `7 T, S    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}* j0 t& S/ Q3 L6 `$ G
    83ac:        e3a04000         mov        r4, #0/ v* H0 ?4 a4 i( w* A" ^& c* c
    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]
# F8 n# ^' i' J2 p    83b4:        e1a00006         mov        r0, r6# K$ y/ K& e# h, \# Q  K) c! \. ~+ Y
    83b8:        e1a01007         mov        r1, r7
) |! `# Q- Y; b  `1 Q; t0 N    83bc:        e1a02008         mov        r2, r8
2 D' X% W6 ~  N: u    83c0:        e2844001         add        r4, r4, #1+ ]( u. k* \9 ~( }: p2 s
    83c4:        e12fff33         blx        r3
' T; u2 }7 N1 D/ S0 E8 O1 q    83c8:        e1540005         cmp        r4, r5
( `2 }) {: V: J1 Q' Y' O    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>
+ ?' Z5 \# l+ ]) E    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}
% n+ ^0 V4 r7 v/ _! L$ ]7 n    83d4:        00008054         .word        0x00008054
" J2 X/ T1 n& L1 q  l- S    83d8:        00008054         .word        0x00008054
- N, `7 m9 @1 V( |; dnone:9 z4 Z1 j8 |, g# B0 f( T& y
Disassembly of section .fini:
# [. F) i7 d' s; T! P# j
0 J  f  e* C4 ]00008474 <_fini>:
$ C+ j% j2 C: h& j" y. s    8474:        e92d4010         push        {r4, lr}
# Q* W1 Y% n" I    8478:        e8bd8010         pop        {r4, pc}( Z: Q9 N/ Y  D  O/ h
arago:
. R2 q! |$ M* s8 w+ q8 U9 @) P3 cDisassembly of section .fini:2 i% l4 S4 x2 W& m

/ z1 T+ |7 O: w" A2 B000083e0 <_fini>:
. V+ X( k; ?4 z+ K4 b% z    83e0:        e92d4008         push        {r3, lr}% Z* b# ~( u( q" _& l- u
    83e4:        e8bd8008         pop        {r3, pc}: U/ d2 r% Z" h% F# }6 Y& Y
4 i: `* X8 \9 x

( k& @4 ^; L6 H6 w1 W
$ l1 p$ i/ s, [
作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。
& x" h! e+ D: V) ^2 ^4 u我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。
' R) v' K7 U; _6 [7 X3 K关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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