The first application development board also toss

Error Description: 
Linux kernel and file system build a good, natural is to run a hello world to show respect, but the problem arises. 
. / The Hello 

Tip: 
the Hello ( 46 ): undefined Instruction: PC = (ptrval) 
the CPU: 0 PID : 46 Comm: LED2 Not Tainted 5.2 . 6 # 23 
Hardware name: SMDK2440 
PC IS AT 0xb6f05328 
LR IS AT 0xb6f00734 
PC: [ <b6f05328>] LR: [<b6f00734>] PSR: 80.00001 million 
SP: beeb6c00 ip: beeb6ea0 fp: b6f00418  
r10: b6f00734 r9: b6f00288 r8: beeb6c20
r7: b6f00000 R6: 0002702c r5: r4 b6f006ec: b6f00000 
r3:00000001  r2 : 00026f10  r1 : 00001915  r0 : 000000a0
Flags: Nzcv  IRQs on  FIQs on  Mode USER_32  ISA ARM  Segment user
Control: c000717f  Table: 33034000  DAC: 00000055
Code: e59b2004 e203300f e59d7020 e353000a (e6ef1071) 
Illegal instruction
Tip undefined instruction undefined instruction. This time, the first experience is manifested. 
This is when I compile busybox like, 
I think my current version of the compiler is ARM -linux-gcc 4.6 . 4 compiled applications for me this s3c2440c is so new, I do not support this new arm cpu command, so the compiler error. 

so I switch to arm -linux gcc- 3 . + version. this should be thinking about it. 
again execution 

Tip:
 - / bin / SH: ./ the Hello: not found 

after Baidu: 
find ways to troubleshoot the error: 

1 on Ubuntu:. 
readelf the Hello -a view ELF information:
程序头:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  PHDR           0x000034 0x00008034 0x00008034 0x000c0 0x000c0 R E 0x4
  INTERP         0x0000f4 0x000080f4 0x000080f4 0x00013 0x00013 R   0x1
      [Requesting program interpreter: /lib/ld-linux.so.2]
  LOAD           0x000000 0x00008000 0x00008000 0x00750 0x00750 R E 0x8000
  LOAD           0x000750 0x00010750 0x00010750 0x00128 0x0012c RW  0x8000
  DYNAMIC        0x000760 0x00010760 0x00010760 0x000c8 0x000c8 RW  0x4
  NOTE           0x000108 0x00008108 0x00008108 0x00020 0x00020 R   0x4
See the keyword; depends on /lib/ld-linux.so. 2 

Well, I have not it ? 
/ Usr / sbin # LS / lib / 
LD -linux.so. 3   libc.so. 6       libm.so. 6       modules tmp 


I actually LD -linux.so. 3 

this time I think of it: the LD -linux.so. 3 is from my Linux-ARM-gcc 4.6 . 4 copies of the compiler's over, and now I replaced gcc3, it may not be supported. 

solution: 
so drop all lib files again from ARM -linux-gcc 3 + copy folder. 

compile, execute successfully.

Summary: What version of the compiler, lib library files to use the following corresponding version, so as to execute successfully.

 

Guess you like

Origin www.cnblogs.com/kmist/p/11369935.html