嵌入式开发者社区

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

作者: 蜡烛    时间: 2016-6-4 20:49
标题: 交叉编译器 疑问
在工具目录下 有两个交叉编译工具
$ {/ |) w+ u) l* t( |, Oarago-2011.09-armv5te-linux-gnueabi-sdk* P, G7 N9 B; X6 L9 g; G9 S
arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu
) F  K, Y4 `$ o0 d& C% ]! Q' g这两个 交叉编译 工具 有什么区别  
. [: {+ z4 c- U3 C  f7 q+ }1 [2 w( ~; b4 @; f- q, F, N

' m' M% T$ p$ p! F. N
作者: tenny    时间: 2016-6-8 16:07
有区别的,具体的说不上。推荐使用 arago
作者: Jackindata    时间: 2016-6-8 17:03
arago 对 TI 的支持应该更好  }  Q3 L# ~$ N2 p& \3 `) u
http://arago-project.org/wiki/index.php/Main_Page
作者: 蜡烛    时间: 2016-6-8 22:54
Jackindata 发表于 2016-6-8 17:035 r3 ]# O* |( X4 Z7 ?
arago 对 TI 的支持应该更好
! u! k: S3 j+ z4 U. `http://arago-project.org/wiki/index.php/Main_Page

5 L' K+ X. M; [& D0 A4 P的确 文章里说 支持和更新 都优先支持 arago , 在实际编译出来输出文件 不知道有没有什么 优化。
作者: 蜡烛    时间: 2016-6-9 23:03
源码:; W/ h! Z/ z9 h$ _
  1 #include<stdio.h>                                                           
% j0 N; D! f1 a: ?- L  2 #include<math.h>. l/ j9 |' t! s3 ~$ b* s# S/ c+ Q  \
  3 int main(int argc,char* argv[])/ G7 m8 x; {# D3 y9 P
  4 {
: y1 b/ B: T9 c+ l2 D+ j4 g  5     int a,b,c;
3 a% ~% k- L9 Q  6     c = a * b;
3 f$ ~  H/ _& n3 _0 J1 ~7 Y  7     return 0;
) X& V# q! Y4 B2 ~# r  8 }6 S& A4 |8 G1 Y7 r

; `5 p' o9 {8 [! i7 d* f* |* F9 d3 W' C下面是两个编译器 编译出来的差异  差异好像不是很大  arm汇编不是很熟悉 大家看看
! k& S" X% o/ O  ?none:
, S" p/ _' |% v$ f6 i6 o000082e0 <_init>:) d2 v3 ~: q/ t, O- L% r, Y3 q8 |
    82e0:        e92d4010         push        {r4, lr}% j6 H# d. k% ^" ?' m: g- p5 J3 g
    82e4:        eb00001c         bl        835c <call_gmon_start>" M4 [6 {$ t- u
    82e8:        e8bd8010         pop        {r4, pc}. r8 D: L6 _9 B* B% J, y( X) b
arago:; K( }& M9 }; N3 }) a
00008250 <_init>:! [$ }$ f" p7 W9 W9 \- c
    8250:        e92d4008         push        {r3, lr}: ]) q! i- A3 n
    8254:        eb00001d         bl        82d0 <call_gmon_start>2 H! n# o* M  f$ \8 _
    8258:        e8bd8008         pop        {r3, pc}2 y% |( b1 [* p( u' Y
$ k( M3 d2 i) t: X# X
none:' D" t: ^( X9 i
000082ec <.plt>:
  H  L0 K) r2 f8 D5 a! R( X$ h    82ec:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
7 b1 R# w* h2 |5 ~" b8 O    82f0:        e59fe004         ldr        lr, [pc, #4]        ; 82fc <_init+0x1c>
' l" l. ]. \9 n& [7 x3 G    82f4:        e08fe00e         add        lr, pc, lr% D7 U6 i8 l$ @
    82f8:        e5bef008         ldr        pc, [lr, #8]!
6 L( O) l$ \/ i: D    82fc:        000082d4         .word        0x000082d45 z( C% G5 ]- ?( `, c9 ^3 V
    8300:        e28fc600         add        ip, pc, #0        ; 0x03 F  w6 V+ ^/ a9 D! Q. P$ [
    8304:        e28cca08         add        ip, ip, #32768        ; 0x8000# Y: u" u/ {6 `8 I. ]
    8308:        e5bcf2d4         ldr        pc, [ip, #724]!
4 Y2 A0 Y1 d: s: R    830c:        e28fc600         add        ip, pc, #0        ; 0x0
% o  ~4 _% g1 c5 l1 }    8310:        e28cca08         add        ip, ip, #32768        ; 0x8000; u/ X( o2 M4 C- V/ j
    8314:        e5bcf2cc         ldr        pc, [ip, #716]!- E' A3 A5 x; s
    8318:        e28fc600         add        ip, pc, #0        ; 0x0
5 ]% |4 L0 s) s& J7 B- R) X  A    831c:        e28cca08         add        ip, ip, #32768        ; 0x8000
& x2 [( K1 d7 ?5 l$ e    8320:        e5bcf2c4         ldr        pc, [ip, #708]!
/ y1 E! C/ _* E: q- }arago:7 ?$ r9 u1 B  |
0000825c <.plt>:
  O6 t# E6 a) b    825c:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
8 s' i1 p" |0 D# S$ M    8260:        e59fe004         ldr        lr, [pc, #4]        ; 826c <_init+0x1c>" S5 d' y+ g9 s
    8264:        e08fe00e         add        lr, pc, lr  B# y( E) S6 I! x. E: G
    8268:        e5bef008         ldr        pc, [lr, #8]!
/ t! B2 }+ v7 V) ]' ]: K! D    826c:        0000827c         .word        0x0000827c
1 ?7 w& T/ i0 t0 ]7 ~6 X    8270:        e28fc600         add        ip, pc, #0) m1 [6 E: |0 ?: L( {
    8274:        e28cca08         add        ip, ip, #32768        ; 0x8000
3 ^0 S) O. q5 Z! }0 l    8278:        e5bcf27c         ldr        pc, [ip, #636]!        ; 0x27c
# Y" J$ E; E* @    827c:        e28fc600         add        ip, pc, #0
: j* k3 o% E4 H& c4 u& C4 G    8280:        e28cca08         add        ip, ip, #32768        ; 0x80006 f( z) `  n$ t- q2 Q2 T0 h; e
    8284:        e5bcf274         ldr        pc, [ip, #628]!        ; 0x274) N. D8 S6 a1 N& D* r9 z
    8288:        e28fc600         add        ip, pc, #0' a# C( F0 u0 J6 Y
    828c:        e28cca08         add        ip, ip, #32768        ; 0x8000
6 W7 `8 v4 j# T5 ?    8290:        e5bcf26c         ldr        pc, [ip, #620]!        ; 0x26c: v, |5 x/ g% `, A$ q
none:+ x, i1 C" ?% Z! K9 W; x6 p
00008324 <_start>:
6 z; h; Y  S' x, F! m9 ?    8324:        e59fc024         ldr        ip, [pc, #36]        ; 8350 <_start+0x2c>7 F8 Y" g1 C0 _$ Z" s: ^
    8328:        e3a0b000         mov        fp, #0        ; 0x0
1 k4 w0 A, {( a1 Q5 \    832c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)( y2 g. F' D- \8 H
    8330:        e1a0200d         mov        r2, sp
; M1 J- }6 t* j  s    8334:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)3 w7 n% i8 q* m  o4 l
    8338:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
3 i! i+ F5 B6 X) p  H' }; D6 {5 o- X    833c:        e59f0010         ldr        r0, [pc, #16]        ; 8354 <_start+0x30>! w" j9 S, b# R: F
    8340:        e59f3010         ldr        r3, [pc, #16]        ; 8358 <_start+0x34>. O9 h0 K4 Q$ n7 w1 n
    8344:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)4 N! [: ?1 L! s* S3 g, S/ ^$ z  U  e
    8348:        ebffffef         bl        830c <_init+0x2c>/ O7 i1 I  A8 f; m' `3 I: Q  R
    834c:        ebffffeb         bl        8300 <_init+0x20>
. v# Q. ?* R- o& n    8350:        00008404         .word        0x00008404, T' I7 s6 q" q
    8354:        000083cc         .word        0x000083cc
5 j; {  O+ Q! O# v/ j    8358:        00008408         .word        0x00008408
5 `( J- {! x8 w6 S/ Iarago:
" ]& R% c/ d) w: F# t00008294 <_start>:0 M8 t- `: M1 k- c" s
    8294:        e3a0b000         mov        fp, #0- y* p; S; s$ V
    8298:        e3a0e000         mov        lr, #0# h# R& X! g5 `- R. ]- Z% ~# ]0 g
    829c:        e49d1004         pop        {r1}                ; (ldr r1, [sp], #4)
, ?& G; l7 d4 p" i& L  ?    82a0:        e1a0200d         mov        r2, sp9 D4 g% n! Y9 A
    82a4:        e52d2004         push        {r2}                ; (str r2, [sp, #-4]!)7 Q3 `- T' B: ^( y* G7 E5 {( D
    82a8:        e52d0004         push        {r0}                ; (str r0, [sp, #-4]!)
! K! X" `5 s5 j" N- ~* v    82ac:        e59fc010         ldr        ip, [pc, #16]        ; 82c4 <_start+0x30>
& y8 j; O8 C( M4 D; k/ g    82b0:        e52dc004         push        {ip}                ; (str ip, [sp, #-4]!)
3 H) C/ y5 O+ n" p5 n: L. m  g    82b4:        e59f000c         ldr        r0, [pc, #12]        ; 82c8 <_start+0x34>. u" `7 z9 K( ~' z: H( Y
    82b8:        e59f300c         ldr        r3, [pc, #12]        ; 82cc <_start+0x38>+ C' A, g" D: r" W
    82bc:        ebffffee         bl        827c <_init+0x2c>" D" y; X5 h2 e' L
    82c0:        ebffffea         bl        8270 <_init+0x20>7 r1 A6 S4 M& I& O4 f' E! \/ d
    82c4:        000083dc         .word        0x000083dc8 k0 O$ o& U/ V' p& g
    82c8:        00008344         .word        0x00008344
9 L( b) i! L% `$ B2 f, H    82cc:        0000837c         .word        0x0000837c
3 K) k9 u$ @& T8 bnone:
& @( Z7 L1 t- S- u0 ?, H, M9 b0000835c <call_gmon_start>:
6 u6 H$ \- b  v/ ]; i/ t  A    835c:        e59f3014         ldr        r3, [pc, #20]        ; 8378 <call_gmon_start+0x1c>0 S, m& h/ b6 J$ Z
    8360:        e59f2014         ldr        r2, [pc, #20]        ; 837c <call_gmon_start+0x20>* J9 C( [- N9 @, n3 y5 h
    8364:        e08f3003         add        r3, pc, r3
: T# K  n, v: l7 ?    8368:        e7931002         ldr        r1, [r3, r2]
2 w; G4 G- i) N% T    836c:        e3510000         cmp        r1, #0        ; 0x07 {; I& J3 T9 k) B. P  k& d
    8370:        012fff1e         bxeq        lr
; V7 G& S. _* p$ ^$ P1 j1 }' Q    8374:        eaffffe7         b        8318 <_init+0x38># {& X! h) N) X
    8378:        00008264         .word        0x00008264
% x- x* }: T. b    837c:        00000018         .word        0x00000018+ X) f" o, `4 I6 J% g7 d
arago:
- k- H* r" @4 k000082d0 <call_gmon_start>:" e6 r- S4 r6 ?% `, h, M
    82d0:        e59f3014         ldr        r3, [pc, #20]        ; 82ec <call_gmon_start+0x1c>- Y0 b. a2 h* J, h/ k8 F
    82d4:        e59f0014         ldr        r0, [pc, #20]        ; 82f0 <call_gmon_start+0x20>9 p+ m, U8 L6 n  O- k; s
    82d8:        e08f3003         add        r3, pc, r3
2 y" s' k% I6 h- w; [    82dc:        e7932000         ldr        r2, [r3, r0]
  Z7 P5 G0 ~; T4 V    82e0:        e3520000         cmp        r2, #0
2 r; C4 \: K5 s( J# _3 ^7 Y8 r    82e4:        012fff1e         bxeq        lr
3 o$ G; ~& h9 v, W/ V3 d1 K' }, ?    82e8:        eaffffe6         b        8288 <_init+0x38>
  D8 G! a! W  a6 h    82ec:        00008208         .word        0x00008208
9 @$ U6 I* [$ C7 ^4 F# a1 v9 b    82f0:        00000018         .word        0x00000018( y. ], X# V( z6 U. _; X% n' b6 ]
none:( T9 v9 R/ N# V* X
00008380 <__do_global_dtors_aux>:$ _  V" r0 w( r1 ~( X5 C
    8380:        e59f2010         ldr        r2, [pc, #16]        ; 8398 <__do_global_dtors_aux+0x18>
5 P. v# l4 n7 C& r* E    8384:        e5d23000         ldrb        r3, [r2]
" e1 z' d7 L, U& p# o    8388:        e3530000         cmp        r3, #0        ; 0x0% }  x7 |3 n; Z1 T
    838c:        03a03001         moveq        r3, #1        ; 0x1
( }( x2 ]1 A$ m6 v4 K* {    8390:        05c23000         strbeq        r3, [r2]8 H6 z6 i4 p- E. p' D% i4 S
    8394:        e12fff1e         bx        lr( Y8 \5 o. I+ s0 d1 s
    8398:        000105f4         .word        0x000105f4
- C) x5 f% e) Darago:* V$ K2 i( a  @% ]) J2 ~/ G1 Z- d2 s
000082f4 <__do_global_dtors_aux>:" B$ {& G! c! u/ c7 Z9 ?6 G
    82f4:        e59f3010         ldr        r3, [pc, #16]        ; 830c <__do_global_dtors_aux+0x18>
" h3 x. x$ Z$ t# D1 t    82f8:        e5d32000         ldrb        r2, [r3]
2 p- S3 V2 W. l! d# m2 q2 |, k: d, X0 H    82fc:        e3520000         cmp        r2, #0: @; i: e6 z8 e  O: S
    8300:        02822001         addeq        r2, r2, #1
$ w+ a8 W  `/ Q' F    8304:        05c32000         strbeq        r2, [r3]
) S9 G) H+ G/ R( \$ M8 V9 D" t6 O    8308:        e12fff1e         bx        lr) a) R, _: m, ^4 a7 j
    830c:        0001050c         .word        0x0001050c+ K, Z  H# K! _
none:! H) X+ C1 v3 e+ Z! i# I% {6 Q
0000839c <frame_dummy>:& z" t# b2 Q8 V% r) [: c
    839c:        e59f0020         ldr        r0, [pc, #32]        ; 83c4 <frame_dummy+0x28>
& U, f3 M( R. ^7 j3 G7 S    83a0:        e92d4010         push        {r4, lr}+ P8 S7 l5 O; T# P) K
    83a4:        e5903000         ldr        r3, [r0]* h$ V8 {# t% Z1 p- b
    83a8:        e3530000         cmp        r3, #0        ; 0x0
. J- o7 H( `: h' k, {    83ac:        08bd8010         popeq        {r4, pc}
& e6 A8 q+ q( {" X1 h    83b0:        e59f3010         ldr        r3, [pc, #16]        ; 83c8 <frame_dummy+0x2c>8 A, \( ?5 G: D+ g8 o8 j
    83b4:        e3530000         cmp        r3, #0        ; 0x0" ~7 d' I7 w/ W
    83b8:        08bd8010         popeq        {r4, pc}
6 j! W/ q0 H3 X. V, l5 e$ o6 y9 [    83bc:        e12fff33         blx        r32 O3 Q% Z3 |' {( }) N+ Y' [; ?
    83c0:        e8bd8010         pop        {r4, pc}3 n5 F3 C: q8 r1 K* i" ^1 S7 u; T
    83c4:        000104dc         .word        0x000104dc. N, g3 H/ t7 _- o" d! @
    83c8:        00000000         .word        0x00000000
) X% t& j& D5 H- s9 @- p% Earago:
. D+ i1 F9 J: a  g00008310 <frame_dummy>:
+ e  L" X! E1 y  Q% a# V& O    8310:        e59f0024         ldr        r0, [pc, #36]        ; 833c <frame_dummy+0x2c>& k6 C& K) q' P4 O8 G" z3 K9 k' \+ l
    8314:        e92d4008         push        {r3, lr}, g1 j- R# ?$ [( p# Z
    8318:        e5903000         ldr        r3, [r0]
% B( v! k; d! \4 {7 I    831c:        e3530000         cmp        r3, #07 {: |% ^( j  C  I+ A) C
    8320:        0a000003         beq        8334 <frame_dummy+0x24>8 o) F$ Z8 L9 e  O
    8324:        e59f3014         ldr        r3, [pc, #20]        ; 8340 <frame_dummy+0x30>
) n- y4 }* {- L# w    8328:        e3530000         cmp        r3, #0
6 I( A2 e: \8 a    832c:        11a0e00f         movne        lr, pc
+ [4 m' Q) ]% n3 ]. g    8330:        112fff13         bxne        r3
, v! U  |: p+ D    8334:        e8bd4008         pop        {r3, lr}
1 ]# q- O6 K" g8 ]    8338:        e12fff1e         bx        lr+ Y+ P' q: ]6 H' ~- m- G
    833c:        000103fc         .word        0x000103fc
5 N1 m% S3 m0 a" O    8340:        00000000         .word        0x000000007 n+ `: A6 o. x% ]' K
none:( j4 \) W1 c, a/ s
000083cc <main>:" }" d8 b2 o- [1 w& p) v0 l( `
    83cc:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)$ [# U: @$ I1 i* F: X
    83d0:        e28db000         add        fp, sp, #0        ; 0x02 s6 u: E' m( z$ ^* W" X' V
    83d4:        e24dd01c         sub        sp, sp, #28        ; 0x1c
2 t2 W* e( c  Q1 N8 S, ~3 d    83d8:        e50b0018         str        r0, [fp, #-24]
7 J1 p% o" n' F2 I    83dc:        e50b101c         str        r1, [fp, #-28]
3 _2 Y" ~% {4 H1 J4 ^* T, p    83e0:        e51b2010         ldr        r2, [fp, #-16]
  i8 F/ s* C4 v- h8 s. u9 i1 b    83e4:        e51b300c         ldr        r3, [fp, #-12]
1 B# r8 L- O8 V& z9 k* e; A& r1 J( f7 G    83e8:        e0030392         mul        r3, r2, r3
4 S& u' P  P, y4 J. w* W    83ec:        e50b3008         str        r3, [fp, #-8]; l$ {8 c! `/ [( v
    83f0:        e3a03000         mov        r3, #0        ; 0x0" \& r  k) s9 b# j
    83f4:        e1a00003         mov        r0, r3
% S4 o1 J* z7 E( k6 t; \9 ^1 ]+ R" B    83f8:        e28bd000         add        sp, fp, #0        ; 0x0
! `9 N. O) m% Y& @% R, w; `    83fc:        e8bd0800         pop        {fp}
" d+ P0 o' S" |    8400:        e12fff1e         bx        lr# g/ r3 ^- D$ x+ Z( T; u  q
arago:
& f5 R; D% ^; ]3 f$ h+ s4 `' Q00008344 <main>:9 k8 B2 j9 m, J8 J
    8344:        e52db004         push        {fp}                ; (str fp, [sp, #-4]!)2 l, R. Q( d4 ^4 o3 z9 e+ @
    8348:        e28db000         add        fp, sp, #0  j; A" m# z, x6 e, |
    834c:        e24dd01c         sub        sp, sp, #28
7 q3 o! _8 T) v    8350:        e50b0018         str        r0, [fp, #-24]
) ~4 S1 D, G! [4 e$ U    8354:        e50b101c         str        r1, [fp, #-28]
! F6 D& z% U2 A    8358:        e51b3008         ldr        r3, [fp, #-8]' B! T5 x# ^" @% o  r4 K
    835c:        e51b200c         ldr        r2, [fp, #-12]
2 J. ?( e0 M+ o5 b* F5 M: n    8360:        e0030392         mul        r3, r2, r37 l  O. S7 v1 a0 _
    8364:        e50b3010         str        r3, [fp, #-16]) j. [7 q( a3 I, n6 q, Z5 x+ p, X
    8368:        e3a03000         mov        r3, #0$ v7 f* |) O" @2 P8 s
    836c:        e1a00003         mov        r0, r3
* E% f+ H9 C1 y1 V; f* p    8370:        e28bd000         add        sp, fp, #0+ b2 o4 s3 B6 t
    8374:        e8bd0800         pop        {fp}
" G" }2 U) g+ h: Z8 L% x6 ?7 T    8378:        e12fff1e         bx        lr
% G3 P. ?  b+ {' l3 Unone:' t/ Y9 T+ Z, J) u7 q
00008404 <__libc_csu_fini>:
. z$ q+ h; o2 C8 [, B3 v; Q    8404:        e12fff1e         bx        lr$ k! Z3 w; w0 F  h& V2 s* D, Z
arago:2 D  v/ Y! b6 J% W: c
000083dc <__libc_csu_fini>:
, G2 W4 z$ v( t/ U0 U) K    83dc:        e12fff1e         bx        lr
' _9 b; Z% z. T' Dnone:5 ?  s5 l, Y8 H. E! ]2 o
00008408 <__libc_csu_init>:7 P) O( R) O( v3 \2 V
    8408:        e92d47f0         push        {r4, r5, r6, r7, r8, r9, sl, lr}
( j7 v( Q: T4 }/ n& u" h    840c:        e1a08001         mov        r8, r1
. o" p; f3 V9 a1 y% J. z    8410:        e1a07002         mov        r7, r2
" G* V6 e7 Y% a0 B7 y. u0 M    8414:        e1a0a000         mov        sl, r0
9 ~+ ?( m9 j2 d2 y' p    8418:        ebffffb0         bl        82e0 <_init>
2 b. u% a$ x+ z; L% x    841c:        e59f1044         ldr        r1, [pc, #68]        ; 8468 <__libc_csu_init+0x60>, x6 E1 B3 T# ~* _
    8420:        e59f3044         ldr        r3, [pc, #68]        ; 846c <__libc_csu_init+0x64>9 r$ l* ]% P) i( K$ a/ k1 Z& A
    8424:        e59f2044         ldr        r2, [pc, #68]        ; 8470 <__libc_csu_init+0x68>
% N1 y- S) u) ]5 y! R    8428:        e0613003         rsb        r3, r1, r3$ w# ^% O, l% b9 A+ n* V9 P" b0 E
    842c:        e08f2002         add        r2, pc, r2- \# T0 g9 @3 ^7 y- ^0 b0 y! Q
    8430:        e1b05143         asrs        r5, r3, #2
+ ^  O7 a  E0 k7 M! Q    8434:        e0822001         add        r2, r2, r1* U) ^& r2 ]- p  |
    8438:        08bd87f0         popeq        {r4, r5, r6, r7, r8, r9, sl, pc}- W% {& I9 K8 r0 n: v2 B3 {
    843c:        e1a06002         mov        r6, r2& f! C* l5 x% H2 L' L' J* |0 e
    8440:        e3a04000         mov        r4, #0        ; 0x0" e6 v8 r# |  S' H" F& l$ b
    8444:        e1a0000a         mov        r0, sl8 L/ ]; ~) S( S" \% V
    8448:        e1a01008         mov        r1, r8
+ m* ]3 L% f( @2 d; D$ [1 ?: _    844c:        e1a02007         mov        r2, r70 d6 @, m: ]% K6 m  D  P. P
    8450:        e1a0e00f         mov        lr, pc
) V" Q  V4 M- e  {: T/ n    8454:        e796f104         ldr        pc, [r6, r4, lsl #2]
; |! a( x2 c) B0 }: F    8458:        e2844001         add        r4, r4, #1        ; 0x1' ?) _% L# u9 Y9 M" A# I8 b* Y
    845c:        e1540005         cmp        r4, r5) h7 {  Q$ }5 a0 p. l, ^# Y
    8460:        3afffff7         bcc        8444 <__libc_csu_init+0x3c>8 Q$ p4 U: L- Z6 N
    8464:        e8bd87f0         pop        {r4, r5, r6, r7, r8, r9, sl, pc}7 R6 N( p0 I0 x8 Y: H
    8468:        ffffff04         .word        0xffffff04! ]! x& V! T# j
    846c:        ffffff08         .word        0xffffff08# @- T& `( x* P/ U3 m
    8470:        0000819c         .word        0x0000819c% K$ ~% r: }  M5 |$ P
arago:' ]# z# j1 m, r; E! V: N9 |. i/ Q
0000837c <__libc_csu_init>:+ g  ]4 w5 _8 i. D5 I9 |
    837c:        e92d45f8         push        {r3, r4, r5, r6, r7, r8, sl, lr}
; c# N  l2 m9 ~; s; b$ _3 y    8380:        e59fa04c         ldr        sl, [pc, #76]        ; 83d4 <__libc_csu_init+0x58>
4 q3 G4 Y& ]6 s  M    8384:        e1a06000         mov        r6, r0
/ q) H1 r) e0 i; A    8388:        e1a07001         mov        r7, r1. Y! U( o1 k" Y' A9 @) F3 Y! y
    838c:        e1a08002         mov        r8, r2( _. A) s6 }; A" ^# }1 T
    8390:        ebffffae         bl        8250 <_init>4 v! n% [5 O" |/ f& o' T1 ~* Y
    8394:        e59f103c         ldr        r1, [pc, #60]        ; 83d8 <__libc_csu_init+0x5c>0 A8 Y3 x3 c  `9 V! v
    8398:        e08fa00a         add        sl, pc, sl6 f6 l9 I1 ~+ \/ S. Q! i
    839c:        e08f0001         add        r0, pc, r1
: T! F: @9 g' J: N8 E8 y2 _    83a0:        e06a5000         rsb        r5, sl, r0
0 @4 M4 d* }7 `: H+ A" M6 |/ G  P- @    83a4:        e1b05145         asrs        r5, r5, #2
5 p/ h! h" q) w8 r    83a8:        08bd85f8         popeq        {r3, r4, r5, r6, r7, r8, sl, pc}
/ Q" R: ^4 @$ U" B' z    83ac:        e3a04000         mov        r4, #0
9 e* B, u  D# j* s    83b0:        e79a3104         ldr        r3, [sl, r4, lsl #2]
8 O' r$ q' r: [$ e    83b4:        e1a00006         mov        r0, r64 k  o2 U6 g7 b9 A
    83b8:        e1a01007         mov        r1, r7
) f) }4 `1 S5 n9 v    83bc:        e1a02008         mov        r2, r8+ V6 ^) N% A: D, T8 t9 `% n( y% W
    83c0:        e2844001         add        r4, r4, #1
( B1 m# E# F' c7 l5 L" K    83c4:        e12fff33         blx        r3
' R% t$ h+ r1 q4 p, u  h, R9 A    83c8:        e1540005         cmp        r4, r5& D$ i+ F; e; I+ L* D
    83cc:        3afffff7         bcc        83b0 <__libc_csu_init+0x34>
! Q* v2 M" A$ {+ J& w, Y4 c    83d0:        e8bd85f8         pop        {r3, r4, r5, r6, r7, r8, sl, pc}
* _4 h7 s2 g& @* h* i% M' e1 c! }/ R    83d4:        00008054         .word        0x00008054
0 V6 g/ ?/ I( F0 I; d; j9 |    83d8:        00008054         .word        0x000080540 z+ S% V( s9 {. |: g
none:5 a, F" }1 h2 u& Q. W# n
Disassembly of section .fini:2 J: C+ M, w0 \! p7 w6 u' }
; d: j7 L# }" m$ A
00008474 <_fini>:
( ~% h3 U1 d1 ]2 d( C    8474:        e92d4010         push        {r4, lr}
+ [( ]. R! \* g    8478:        e8bd8010         pop        {r4, pc}3 y6 a) l* ^( [, t+ P0 c6 ^" `1 _: Y
arago:
" E7 j6 c) r' m! L4 [# F# e* o- ^Disassembly of section .fini:, d/ i5 n- B' l! v  [

1 M( ~2 ^' ~; I3 }000083e0 <_fini>:
4 Q$ u3 B1 m0 d! D' h+ z    83e0:        e92d4008         push        {r3, lr}
) C/ G7 `7 Z4 h) u1 M5 `    83e4:        e8bd8008         pop        {r3, pc}7 q8 ?4 A' s3 w# u9 j

( @7 h8 F0 E* I& f3 ?: R
- ]/ v4 @3 F0 a4 C; z) y2 \" q7 L

作者: Jackindata    时间: 2016-6-21 16:35
粗看是使用的寄存器有点不同。& f/ W( G# J/ b3 y
我觉得这个基本程序代码的汇编差异不会有什么结果上的影响。
& V# V: [. k& j% u2 m6 ^关键可能在于对于 TI 本身提供的一些特性,arago 针对其进行优化,这类的影响才会比较大吧。




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