[問題] ARM ELF 執行問題

作者: mshockwave (夏克維夫)   2014-08-03 22:06:25
各位大大好 最近剛移植一個linux到cubieboard2
移植玩時我有丟一個超簡單小程式確認系統函式庫運作正常 小程式也跑得起來
但是當我丟一些複雜一點的程式時 卻一直core dump
最扯的是想說用gdbserver來debug gdbserver卻也core dump!!
折騰一番終於拿到gdbserver的core file 用gdb打開一看
dump的地方卻在_start()函式開頭
在這邊貼一下gdbserver的_start():(噴錯的就是第一行 0x8860)
00008860 <_start>:
8860: f04f 0b00 mov.w fp, #0
8864: f04f 0e00 mov.w lr, #0
8868: f85d 1b04 ldr.w r1, [sp], #4
886c: 466a mov r2, sp
886e: f84d 2d04 str.w r2, [sp, #-4]!
8872: f84d 0d04 str.w r0, [sp, #-4]!
8876: f8df c014 ldr.w ip, [pc, #20] ; 888c <_start+0x2c>
887a: f84d cd04 str.w ip, [sp, #-4]!
887e: 4804 ldr r0, [pc, #16] ; (8890
<_start+0x30>)
8880: 4b04 ldr r3, [pc, #16] ; (8894
<_start+0x34>)
8882: f02b fdef bl 34464 <__libc_start_main>
8886: f02c fb47 bl 34f18 <abort>
888a: 0000 .short 0x0000
888c: 00034959 .word 0x00034959
8890: 00013f31 .word 0x00013f31
8894: 000348e9 .word 0x000348e9
我對ELF執行格式與流程不是很了解 需要再貼什麼請各位大大說一下
謝謝
作者: merckhung (小貓排店長)   2014-09-24 04:37:00
你要不要改用 ARM mode 試一下, 看起來是 Thumb2 state

Links booklink

Contact Us: admin [ a t ] ucptt.com