免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1743 | 回复: 0
打印 上一主题 下一主题

怎么把共享库加到开发板里呢 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-04 22:48 |只看该作者 |倒序浏览
本帖最后由 colorshape 于 2011-04-06 20:47 编辑

今天尝试把共享库放到根文件系统的/lib目录下,然后运行动态链接的应用程序,可是还是提示
  1. -/bin/sh: ./app_button: not found
复制代码
共享库不是放在这里的吗,我在哪看过是放在这的
顺带贴出arm-linux-readelf -a app_button的结果供大家分析用:)
  1. ELF Header:
  2.   Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  3.   Class:                             ELF32
  4.   Data:                              2's complement, little endian
  5.   Version:                           1 (current)
  6.   OS/ABI:                            UNIX - System V
  7.   ABI Version:                       0
  8.   Type:                              EXEC (Executable file)
  9.   Machine:                           ARM
  10.   Version:                           0x1
  11.   Entry point address:               0x8388
  12.   Start of program headers:          52 (bytes into file)
  13.   Start of section headers:          2244 (bytes into file)
  14.   Flags:                             0x5000002, has entry point, Version5 EABI
  15.   Size of this header:               52 (bytes)
  16.   Size of program headers:           32 (bytes)
  17.   Number of program headers:         8
  18.   Size of section headers:           40 (bytes)
  19.   Number of section headers:         30
  20.   Section header string table index: 27

  21. Section Headers:
  22.   [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  23.   [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  24.   [ 1] .interp           PROGBITS        00008134 000134 000013 00   A  0   0  1
  25.   [ 2] .note.ABI-tag     NOTE            00008148 000148 000020 00   A  0   0  4
  26.   [ 3] .hash             HASH            00008168 000168 000038 04   A  4   0  4
  27.   [ 4] .dynsym           DYNSYM          000081a0 0001a0 000090 10   A  5   1  4
  28.   [ 5] .dynstr           STRTAB          00008230 000230 000059 00   A  0   0  1
  29.   [ 6] .gnu.version      VERSYM          0000828a 00028a 000012 02   A  4   0  2
  30.   [ 7] .gnu.version_r    VERNEED         0000829c 00029c 000020 00   A  5   1  4
  31.   [ 8] .rel.dyn          REL             000082bc 0002bc 000008 08   A  4   0  4
  32.   [ 9] .rel.plt          REL             000082c4 0002c4 000040 08   A  4  11  4
  33.   [10] .init             PROGBITS        00008304 000304 000010 00  AX  0   0  4
  34.   [11] .plt              PROGBITS        00008314 000314 000074 04  AX  0   0  4
  35.   [12] .text             PROGBITS        00008388 000388 000230 00  AX  0   0  4
  36.   [13] .fini             PROGBITS        000085b8 0005b8 00000c 00  AX  0   0  4
  37.   [14] .rodata           PROGBITS        000085c4 0005c4 000030 00   A  0   0  4
  38.   [15] .ARM.exidx        ARM_EXIDX       000085f4 0005f4 000008 00  AL 12   0  4
  39.   [16] .eh_frame         PROGBITS        000085fc 0005fc 000004 00   A  0   0  4
  40.   [17] .init_array       INIT_ARRAY      00010600 000600 000004 00  WA  0   0  4
  41.   [18] .fini_array       FINI_ARRAY      00010604 000604 000004 00  WA  0   0  4
  42.   [19] .jcr              PROGBITS        00010608 000608 000004 00  WA  0   0  4
  43.   [20] .dynamic          DYNAMIC         0001060c 00060c 0000e8 08  WA  5   0  4
  44.   [21] .got              PROGBITS        000106f4 0006f4 000030 04  WA  0   0  4
  45.   [22] .data             PROGBITS        00010724 000724 000008 00  WA  0   0  4
  46.   [23] .bss              NOBITS          0001072c 00072c 000004 00  WA  0   0  1
  47.   [24] .comment          PROGBITS        00000000 00072c 00002a 00      0   0  1
  48.   [25] .debug_frame      PROGBITS        00000000 000758 000044 00      0   0  4
  49.   [26] .ARM.attributes   ARM_ATTRIBUTES  00000000 00079c 000028 00      0   0  1
  50.   [27] .shstrtab         STRTAB          00000000 0007c4 000100 00      0   0  1
  51.   [28] .symtab           SYMTAB          00000000 000d74 000610 10     29  69  4
  52.   [29] .strtab           STRTAB          00000000 001384 000292 00      0   0  1
  53. Key to Flags:
  54.   W (write), A (alloc), X (execute), M (merge), S (strings)
  55.   I (info), L (link order), G (group), x (unknown)
  56.   O (extra OS processing required) o (OS specific), p (processor specific)

  57. There are no section groups in this file.

  58. Program Headers:
  59.   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  60.   EXIDX          0x0005f4 0x000085f4 0x000085f4 0x00008 0x00008 R   0x4
  61.   PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
  62.   INTERP         0x000134 0x00008134 0x00008134 0x00013 0x00013 R   0x1
  63.       [Requesting program interpreter: /lib/ld-linux.so.3]
  64.   LOAD           0x000000 0x00008000 0x00008000 0x00600 0x00600 R E 0x8000
  65.   LOAD           0x000600 0x00010600 0x00010600 0x0012c 0x00130 RW  0x8000
  66.   DYNAMIC        0x00060c 0x0001060c 0x0001060c 0x000e8 0x000e8 RW  0x4
  67.   NOTE           0x000148 0x00008148 0x00008148 0x00020 0x00020 R   0x4
  68.   GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

  69. Section to Segment mapping:
  70.   Segment Sections...
  71.    00     .ARM.exidx
  72.    01     
  73.    02     .interp
  74.    03     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.exidx .eh_frame
  75.    04     .init_array .fini_array .jcr .dynamic .got .data .bss
  76.    05     .dynamic
  77.    06     .note.ABI-tag
  78.    07     

  79. Dynamic section at offset 0x60c contains 24 entries:
  80.   Tag        Type                         Name/Value
  81. 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
  82. 0x0000000c (INIT)                       0x8304
  83. 0x0000000d (FINI)                       0x85b8
  84. 0x00000019 (INIT_ARRAY)                 0x10600
  85. 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
  86. 0x0000001a (FINI_ARRAY)                 0x10604
  87. 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
  88. 0x00000004 (HASH)                       0x8168
  89. 0x00000005 (STRTAB)                     0x8230
  90. 0x00000006 (SYMTAB)                     0x81a0
  91. 0x0000000a (STRSZ)                      89 (bytes)
  92. 0x0000000b (SYMENT)                     16 (bytes)
  93. 0x00000015 (DEBUG)                      0x0
  94. 0x00000003 (PLTGOT)                     0x106f4
  95. 0x00000002 (PLTRELSZ)                   64 (bytes)
  96. 0x00000014 (PLTREL)                     REL
  97. 0x00000017 (JMPREL)                     0x82c4
  98. 0x00000011 (REL)                        0x82bc
  99. 0x00000012 (RELSZ)                      8 (bytes)
  100. 0x00000013 (RELENT)                     8 (bytes)
  101. 0x6ffffffe (VERNEED)                    0x829c
  102. 0x6fffffff (VERNEEDNUM)                 1
  103. 0x6ffffff0 (VERSYM)                     0x828a
  104. 0x00000000 (NULL)                       0x0

  105. Relocation section '.rel.dyn' at offset 0x2bc contains 1 entries:
  106. Offset     Info    Type            Sym.Value  Sym. Name
  107. 00010720  00000415 R_ARM_GLOB_DAT    00000000   __gmon_start__

  108. Relocation section '.rel.plt' at offset 0x2c4 contains 8 entries:
  109. Offset     Info    Type            Sym.Value  Sym. Name
  110. 00010700  00000116 R_ARM_JUMP_SLOT   00008328   open
  111. 00010704  00000216 R_ARM_JUMP_SLOT   00008334   abort
  112. 00010708  00000316 R_ARM_JUMP_SLOT   00008340   __libc_start_main
  113. 0001070c  00000416 R_ARM_JUMP_SLOT   00000000   __gmon_start__
  114. 00010710  00000516 R_ARM_JUMP_SLOT   00008358   perror
  115. 00010714  00000616 R_ARM_JUMP_SLOT   00008364   read
  116. 00010718  00000716 R_ARM_JUMP_SLOT   00008370   printf
  117. 0001071c  00000816 R_ARM_JUMP_SLOT   0000837c   exit

  118. There are no unwind sections in this file.

  119. Symbol table '.dynsym' contains 9 entries:
  120.    Num:    Value  Size Type    Bind   Vis      Ndx Name
  121.      0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
  122.      1: 00008328   100 FUNC    GLOBAL DEFAULT  UND open@GLIBC_2.4 (2)
  123.      2: 00008334   740 FUNC    GLOBAL DEFAULT  UND abort@GLIBC_2.4 (2)
  124.      3: 00008340   604 FUNC    GLOBAL DEFAULT  UND __libc_start_main@GLIBC_2.4 (2)
  125.      4: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
  126.      5: 00008358   188 FUNC    GLOBAL DEFAULT  UND perror@GLIBC_2.4 (2)
  127.      6: 00008364   100 FUNC    GLOBAL DEFAULT  UND read@GLIBC_2.4 (2)
  128.      7: 00008370    76 FUNC    GLOBAL DEFAULT  UND printf@GLIBC_2.4 (2)
  129.      8: 0000837c   272 FUNC    GLOBAL DEFAULT  UND exit@GLIBC_2.4 (2)

  130. Symbol table '.symtab' contains 97 entries:
  131.    Num:    Value  Size Type    Bind   Vis      Ndx Name
  132.      0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
  133.      1: 00008134     0 SECTION LOCAL  DEFAULT    1
  134.      2: 00008148     0 SECTION LOCAL  DEFAULT    2
  135.      3: 00008168     0 SECTION LOCAL  DEFAULT    3
  136.      4: 000081a0     0 SECTION LOCAL  DEFAULT    4
  137.      5: 00008230     0 SECTION LOCAL  DEFAULT    5
  138.      6: 0000828a     0 SECTION LOCAL  DEFAULT    6
  139.      7: 0000829c     0 SECTION LOCAL  DEFAULT    7
  140.      8: 000082bc     0 SECTION LOCAL  DEFAULT    8
  141.      9: 000082c4     0 SECTION LOCAL  DEFAULT    9
  142.     10: 00008304     0 SECTION LOCAL  DEFAULT   10
  143.     11: 00008314     0 SECTION LOCAL  DEFAULT   11
  144.     12: 00008388     0 SECTION LOCAL  DEFAULT   12
  145.     13: 000085b8     0 SECTION LOCAL  DEFAULT   13
  146.     14: 000085c4     0 SECTION LOCAL  DEFAULT   14
  147.     15: 000085f4     0 SECTION LOCAL  DEFAULT   15
  148.     16: 000085fc     0 SECTION LOCAL  DEFAULT   16
  149.     17: 00010600     0 SECTION LOCAL  DEFAULT   17
  150.     18: 00010604     0 SECTION LOCAL  DEFAULT   18
  151.     19: 00010608     0 SECTION LOCAL  DEFAULT   19
  152.     20: 0001060c     0 SECTION LOCAL  DEFAULT   20
  153.     21: 000106f4     0 SECTION LOCAL  DEFAULT   21
  154.     22: 00010724     0 SECTION LOCAL  DEFAULT   22
  155.     23: 0001072c     0 SECTION LOCAL  DEFAULT   23
  156.     24: 00000000     0 SECTION LOCAL  DEFAULT   24
  157.     25: 00000000     0 SECTION LOCAL  DEFAULT   25
  158.     26: 00000000     0 SECTION LOCAL  DEFAULT   26
  159.     27: 000083c0     0 FUNC    LOCAL  DEFAULT   12 call_gmon_start
  160.     28: 000083c0     0 NOTYPE  LOCAL  DEFAULT   12 $a
  161.     29: 000083e4     0 NOTYPE  LOCAL  DEFAULT   12 $d
  162.     30: 00008304     0 NOTYPE  LOCAL  DEFAULT   10 $a
  163.     31: 000085b8     0 NOTYPE  LOCAL  DEFAULT   13 $a
  164.     32: 00008148     0 NOTYPE  LOCAL  DEFAULT    2 $d
  165.     33: 00008388     0 NOTYPE  LOCAL  DEFAULT   12 $a
  166.     34: 00010724     0 NOTYPE  LOCAL  DEFAULT   22 $d
  167.     35: 000083b4     0 NOTYPE  LOCAL  DEFAULT   12 $d
  168.     36: 00000000     0 FILE    LOCAL  DEFAULT  ABS init.c
  169.     37: 000085c4     0 NOTYPE  LOCAL  DEFAULT   14 $d
  170.     38: 0000830c     0 NOTYPE  LOCAL  DEFAULT   10 $a
  171.     39: 000085bc     0 NOTYPE  LOCAL  DEFAULT   13 $a
  172.     40: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
  173.     41: 00010608     0 OBJECT  LOCAL  DEFAULT   19 __JCR_LIST__
  174.     42: 000083ec     0 FUNC    LOCAL  DEFAULT   12 __do_global_dtors_aux
  175.     43: 000083ec     0 NOTYPE  LOCAL  DEFAULT   12 $a
  176.     44: 00008404     0 NOTYPE  LOCAL  DEFAULT   12 $d
  177.     45: 0001072c     1 OBJECT  LOCAL  DEFAULT   23 completed.5877
  178.     46: 00010604     0 OBJECT  LOCAL  DEFAULT   18 __do_global_dtors_aux_fin
  179.     47: 00010604     0 NOTYPE  LOCAL  DEFAULT   18 $d
  180.     48: 00008408     0 FUNC    LOCAL  DEFAULT   12 frame_dummy
  181.     49: 00008408     0 NOTYPE  LOCAL  DEFAULT   12 $a
  182.     50: 00008434     0 NOTYPE  LOCAL  DEFAULT   12 $d
  183.     51: 00010600     0 OBJECT  LOCAL  DEFAULT   17 __frame_dummy_init_array_
  184.     52: 00010600     0 NOTYPE  LOCAL  DEFAULT   17 $d
  185.     53: 00000000     0 FILE    LOCAL  DEFAULT  ABS app_button.c
  186.     54: 0000843c     0 NOTYPE  LOCAL  DEFAULT   12 $a
  187.     55: 00008534     0 NOTYPE  LOCAL  DEFAULT   12 $d
  188.     56: 00000000     0 FILE    LOCAL  DEFAULT  ABS elf-init.c
  189.     57: 00008540     0 NOTYPE  LOCAL  DEFAULT   12 $a
  190.     58: 000085ac     0 NOTYPE  LOCAL  DEFAULT   12 $d
  191.     59: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtstuff.c
  192.     60: 000085fc     0 OBJECT  LOCAL  DEFAULT   16 __FRAME_END__
  193.     61: 00010608     0 OBJECT  LOCAL  DEFAULT   19 __JCR_END__
  194.     62: 000106f4     0 OBJECT  LOCAL  HIDDEN   21 _GLOBAL_OFFSET_TABLE_
  195.     63: 00010604     0 NOTYPE  LOCAL  HIDDEN   17 __init_array_end
  196.     64: 00010600     0 NOTYPE  LOCAL  HIDDEN   17 __init_array_start
  197.     65: 0001060c     0 OBJECT  LOCAL  HIDDEN   20 _DYNAMIC
  198.     66: 00008314     0 NOTYPE  LOCAL  DEFAULT   11 $a
  199.     67: 00008324     0 NOTYPE  LOCAL  DEFAULT   11 $d
  200.     68: 00008328     0 NOTYPE  LOCAL  DEFAULT   11 $a
  201.     69: 00010724     0 NOTYPE  WEAK   DEFAULT   22 data_start
  202.     70: 00008328   100 FUNC    GLOBAL DEFAULT  UND open@@GLIBC_2.4
  203.     71: 00008334   740 FUNC    GLOBAL DEFAULT  UND abort@@GLIBC_2.4
  204.     72: 00008540     4 FUNC    GLOBAL DEFAULT   12 __libc_csu_fini
  205.     73: 00008388     0 FUNC    GLOBAL DEFAULT   12 _start
  206.     74: 00008340   604 FUNC    GLOBAL DEFAULT  UND __libc_start_main@@GLIBC_
  207.     75: 00000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
  208.     76: 00000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
  209.     77: 000085b8     0 FUNC    GLOBAL DEFAULT   13 _fini
  210.     78: 00008358   188 FUNC    GLOBAL DEFAULT  UND perror@@GLIBC_2.4
  211.     79: 000085c4     4 OBJECT  GLOBAL DEFAULT   14 _IO_stdin_used
  212.     80: 00008364   100 FUNC    GLOBAL DEFAULT  UND read@@GLIBC_2.4
  213.     81: 00010724     0 NOTYPE  GLOBAL DEFAULT   22 __data_start
  214.     82: 0001072c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start__
  215.     83: 000085fc     0 NOTYPE  GLOBAL DEFAULT  ABS __exidx_end
  216.     84: 00010728     0 OBJECT  GLOBAL HIDDEN   22 __dso_handle
  217.     85: 00010730     0 NOTYPE  GLOBAL DEFAULT  ABS __end__
  218.     86: 00008544   116 FUNC    GLOBAL DEFAULT   12 __libc_csu_init
  219.     87: 00010730     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_end__
  220.     88: 00008370    76 FUNC    GLOBAL DEFAULT  UND printf@@GLIBC_2.4
  221.     89: 0001072c     0 NOTYPE  GLOBAL DEFAULT  ABS __bss_start
  222.     90: 00010730     0 NOTYPE  GLOBAL DEFAULT  ABS _bss_end__
  223.     91: 00010730     0 NOTYPE  GLOBAL DEFAULT  ABS _end
  224.     92: 0001072c     0 NOTYPE  GLOBAL DEFAULT  ABS _edata
  225.     93: 000085f4     0 NOTYPE  GLOBAL DEFAULT  ABS __exidx_start
  226.     94: 0000837c   272 FUNC    GLOBAL DEFAULT  UND exit@@GLIBC_2.4
  227.     95: 0000843c   260 FUNC    GLOBAL DEFAULT   12 main
  228.     96: 00008304     0 FUNC    GLOBAL DEFAULT   10 _init

  229. Histogram for bucket list length (total of 3 buckets):
  230. Length  Number     % of total  Coverage
  231.       0  0          (  0.0%)
  232.       1  0          (  0.0%)      0.0%
  233.       2  1          ( 33.3%)     25.0%
  234.       3  2          ( 66.7%)    100.0%

  235. Version symbols section '.gnu.version' contains 9 entries:
  236. Addr: 000000000000828a  Offset: 0x00028a  Link: 4 (.dynsym)
  237.   000:   0 (*local*)       2 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4)  
  238.   004:   0 (*local*)       2 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4)  
  239.   008:   2 (GLIBC_2.4)  

  240. Version needs section '.gnu.version_r' contains 1 entries:
  241. Addr: 0x000000000000829c  Offset: 0x00029c  Link to section: 5 (.dynstr)
  242.   000000: Version: 1  File: libc.so.6  Cnt: 1
  243.   0x0010:   Name: GLIBC_2.4  Flags: none  Version: 2

  244. Notes at offset 0x00000148 with length 0x00000020:
  245.   Owner                Data size        Description
  246.   GNU                0x00000010        NT_GNU_ABI_TAG (ABI version tag)
  247. Attribute Section: aeabi
  248. File Attributes
  249.   Tag_CPU_name: "4T"
  250.   Tag_CPU_arch: v4T
  251.   Tag_ARM_ISA_use: Yes
  252.   Tag_THUMB_ISA_use: Thumb-1
  253.   Tag_ABI_PCS_wchar_t: 4
  254.   Tag_ABI_FP_denormal: Needed
  255.   Tag_ABI_FP_exceptions: Needed
  256.   Tag_ABI_FP_number_model: IEEE 754
  257.   Tag_ABI_align8_needed: Yes
  258.   Tag_ABI_align8_preserved: Yes, except leaf SP
  259.   Tag_ABI_enum_size: int
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP