- 论坛徽章:
- 0
|
本帖最后由 colorshape 于 2011-04-06 20:47 编辑
今天尝试把共享库放到根文件系统的/lib目录下,然后运行动态链接的应用程序,可是还是提示- -/bin/sh: ./app_button: not found
复制代码 共享库不是放在这里的吗,我在哪看过是放在这的
顺带贴出arm-linux-readelf -a app_button的结果供大家分析用:)- ELF Header:
- Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
- Class: ELF32
- Data: 2's complement, little endian
- Version: 1 (current)
- OS/ABI: UNIX - System V
- ABI Version: 0
- Type: EXEC (Executable file)
- Machine: ARM
- Version: 0x1
- Entry point address: 0x8388
- Start of program headers: 52 (bytes into file)
- Start of section headers: 2244 (bytes into file)
- Flags: 0x5000002, has entry point, Version5 EABI
- Size of this header: 52 (bytes)
- Size of program headers: 32 (bytes)
- Number of program headers: 8
- Size of section headers: 40 (bytes)
- Number of section headers: 30
- Section header string table index: 27
- Section Headers:
- [Nr] Name Type Addr Off Size ES Flg Lk Inf Al
- [ 0] NULL 00000000 000000 000000 00 0 0 0
- [ 1] .interp PROGBITS 00008134 000134 000013 00 A 0 0 1
- [ 2] .note.ABI-tag NOTE 00008148 000148 000020 00 A 0 0 4
- [ 3] .hash HASH 00008168 000168 000038 04 A 4 0 4
- [ 4] .dynsym DYNSYM 000081a0 0001a0 000090 10 A 5 1 4
- [ 5] .dynstr STRTAB 00008230 000230 000059 00 A 0 0 1
- [ 6] .gnu.version VERSYM 0000828a 00028a 000012 02 A 4 0 2
- [ 7] .gnu.version_r VERNEED 0000829c 00029c 000020 00 A 5 1 4
- [ 8] .rel.dyn REL 000082bc 0002bc 000008 08 A 4 0 4
- [ 9] .rel.plt REL 000082c4 0002c4 000040 08 A 4 11 4
- [10] .init PROGBITS 00008304 000304 000010 00 AX 0 0 4
- [11] .plt PROGBITS 00008314 000314 000074 04 AX 0 0 4
- [12] .text PROGBITS 00008388 000388 000230 00 AX 0 0 4
- [13] .fini PROGBITS 000085b8 0005b8 00000c 00 AX 0 0 4
- [14] .rodata PROGBITS 000085c4 0005c4 000030 00 A 0 0 4
- [15] .ARM.exidx ARM_EXIDX 000085f4 0005f4 000008 00 AL 12 0 4
- [16] .eh_frame PROGBITS 000085fc 0005fc 000004 00 A 0 0 4
- [17] .init_array INIT_ARRAY 00010600 000600 000004 00 WA 0 0 4
- [18] .fini_array FINI_ARRAY 00010604 000604 000004 00 WA 0 0 4
- [19] .jcr PROGBITS 00010608 000608 000004 00 WA 0 0 4
- [20] .dynamic DYNAMIC 0001060c 00060c 0000e8 08 WA 5 0 4
- [21] .got PROGBITS 000106f4 0006f4 000030 04 WA 0 0 4
- [22] .data PROGBITS 00010724 000724 000008 00 WA 0 0 4
- [23] .bss NOBITS 0001072c 00072c 000004 00 WA 0 0 1
- [24] .comment PROGBITS 00000000 00072c 00002a 00 0 0 1
- [25] .debug_frame PROGBITS 00000000 000758 000044 00 0 0 4
- [26] .ARM.attributes ARM_ATTRIBUTES 00000000 00079c 000028 00 0 0 1
- [27] .shstrtab STRTAB 00000000 0007c4 000100 00 0 0 1
- [28] .symtab SYMTAB 00000000 000d74 000610 10 29 69 4
- [29] .strtab STRTAB 00000000 001384 000292 00 0 0 1
- Key to Flags:
- W (write), A (alloc), X (execute), M (merge), S (strings)
- I (info), L (link order), G (group), x (unknown)
- O (extra OS processing required) o (OS specific), p (processor specific)
- There are no section groups in this file.
- Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- EXIDX 0x0005f4 0x000085f4 0x000085f4 0x00008 0x00008 R 0x4
- PHDR 0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
- INTERP 0x000134 0x00008134 0x00008134 0x00013 0x00013 R 0x1
- [Requesting program interpreter: /lib/ld-linux.so.3]
- LOAD 0x000000 0x00008000 0x00008000 0x00600 0x00600 R E 0x8000
- LOAD 0x000600 0x00010600 0x00010600 0x0012c 0x00130 RW 0x8000
- DYNAMIC 0x00060c 0x0001060c 0x0001060c 0x000e8 0x000e8 RW 0x4
- NOTE 0x000148 0x00008148 0x00008148 0x00020 0x00020 R 0x4
- GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4
- Section to Segment mapping:
- Segment Sections...
- 00 .ARM.exidx
- 01
- 02 .interp
- 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
- 04 .init_array .fini_array .jcr .dynamic .got .data .bss
- 05 .dynamic
- 06 .note.ABI-tag
- 07
- Dynamic section at offset 0x60c contains 24 entries:
- Tag Type Name/Value
- 0x00000001 (NEEDED) Shared library: [libc.so.6]
- 0x0000000c (INIT) 0x8304
- 0x0000000d (FINI) 0x85b8
- 0x00000019 (INIT_ARRAY) 0x10600
- 0x0000001b (INIT_ARRAYSZ) 4 (bytes)
- 0x0000001a (FINI_ARRAY) 0x10604
- 0x0000001c (FINI_ARRAYSZ) 4 (bytes)
- 0x00000004 (HASH) 0x8168
- 0x00000005 (STRTAB) 0x8230
- 0x00000006 (SYMTAB) 0x81a0
- 0x0000000a (STRSZ) 89 (bytes)
- 0x0000000b (SYMENT) 16 (bytes)
- 0x00000015 (DEBUG) 0x0
- 0x00000003 (PLTGOT) 0x106f4
- 0x00000002 (PLTRELSZ) 64 (bytes)
- 0x00000014 (PLTREL) REL
- 0x00000017 (JMPREL) 0x82c4
- 0x00000011 (REL) 0x82bc
- 0x00000012 (RELSZ) 8 (bytes)
- 0x00000013 (RELENT) 8 (bytes)
- 0x6ffffffe (VERNEED) 0x829c
- 0x6fffffff (VERNEEDNUM) 1
- 0x6ffffff0 (VERSYM) 0x828a
- 0x00000000 (NULL) 0x0
- Relocation section '.rel.dyn' at offset 0x2bc contains 1 entries:
- Offset Info Type Sym.Value Sym. Name
- 00010720 00000415 R_ARM_GLOB_DAT 00000000 __gmon_start__
- Relocation section '.rel.plt' at offset 0x2c4 contains 8 entries:
- Offset Info Type Sym.Value Sym. Name
- 00010700 00000116 R_ARM_JUMP_SLOT 00008328 open
- 00010704 00000216 R_ARM_JUMP_SLOT 00008334 abort
- 00010708 00000316 R_ARM_JUMP_SLOT 00008340 __libc_start_main
- 0001070c 00000416 R_ARM_JUMP_SLOT 00000000 __gmon_start__
- 00010710 00000516 R_ARM_JUMP_SLOT 00008358 perror
- 00010714 00000616 R_ARM_JUMP_SLOT 00008364 read
- 00010718 00000716 R_ARM_JUMP_SLOT 00008370 printf
- 0001071c 00000816 R_ARM_JUMP_SLOT 0000837c exit
- There are no unwind sections in this file.
- Symbol table '.dynsym' contains 9 entries:
- Num: Value Size Type Bind Vis Ndx Name
- 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
- 1: 00008328 100 FUNC GLOBAL DEFAULT UND open@GLIBC_2.4 (2)
- 2: 00008334 740 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2)
- 3: 00008340 604 FUNC GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.4 (2)
- 4: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
- 5: 00008358 188 FUNC GLOBAL DEFAULT UND perror@GLIBC_2.4 (2)
- 6: 00008364 100 FUNC GLOBAL DEFAULT UND read@GLIBC_2.4 (2)
- 7: 00008370 76 FUNC GLOBAL DEFAULT UND printf@GLIBC_2.4 (2)
- 8: 0000837c 272 FUNC GLOBAL DEFAULT UND exit@GLIBC_2.4 (2)
- Symbol table '.symtab' contains 97 entries:
- Num: Value Size Type Bind Vis Ndx Name
- 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
- 1: 00008134 0 SECTION LOCAL DEFAULT 1
- 2: 00008148 0 SECTION LOCAL DEFAULT 2
- 3: 00008168 0 SECTION LOCAL DEFAULT 3
- 4: 000081a0 0 SECTION LOCAL DEFAULT 4
- 5: 00008230 0 SECTION LOCAL DEFAULT 5
- 6: 0000828a 0 SECTION LOCAL DEFAULT 6
- 7: 0000829c 0 SECTION LOCAL DEFAULT 7
- 8: 000082bc 0 SECTION LOCAL DEFAULT 8
- 9: 000082c4 0 SECTION LOCAL DEFAULT 9
- 10: 00008304 0 SECTION LOCAL DEFAULT 10
- 11: 00008314 0 SECTION LOCAL DEFAULT 11
- 12: 00008388 0 SECTION LOCAL DEFAULT 12
- 13: 000085b8 0 SECTION LOCAL DEFAULT 13
- 14: 000085c4 0 SECTION LOCAL DEFAULT 14
- 15: 000085f4 0 SECTION LOCAL DEFAULT 15
- 16: 000085fc 0 SECTION LOCAL DEFAULT 16
- 17: 00010600 0 SECTION LOCAL DEFAULT 17
- 18: 00010604 0 SECTION LOCAL DEFAULT 18
- 19: 00010608 0 SECTION LOCAL DEFAULT 19
- 20: 0001060c 0 SECTION LOCAL DEFAULT 20
- 21: 000106f4 0 SECTION LOCAL DEFAULT 21
- 22: 00010724 0 SECTION LOCAL DEFAULT 22
- 23: 0001072c 0 SECTION LOCAL DEFAULT 23
- 24: 00000000 0 SECTION LOCAL DEFAULT 24
- 25: 00000000 0 SECTION LOCAL DEFAULT 25
- 26: 00000000 0 SECTION LOCAL DEFAULT 26
- 27: 000083c0 0 FUNC LOCAL DEFAULT 12 call_gmon_start
- 28: 000083c0 0 NOTYPE LOCAL DEFAULT 12 $a
- 29: 000083e4 0 NOTYPE LOCAL DEFAULT 12 $d
- 30: 00008304 0 NOTYPE LOCAL DEFAULT 10 $a
- 31: 000085b8 0 NOTYPE LOCAL DEFAULT 13 $a
- 32: 00008148 0 NOTYPE LOCAL DEFAULT 2 $d
- 33: 00008388 0 NOTYPE LOCAL DEFAULT 12 $a
- 34: 00010724 0 NOTYPE LOCAL DEFAULT 22 $d
- 35: 000083b4 0 NOTYPE LOCAL DEFAULT 12 $d
- 36: 00000000 0 FILE LOCAL DEFAULT ABS init.c
- 37: 000085c4 0 NOTYPE LOCAL DEFAULT 14 $d
- 38: 0000830c 0 NOTYPE LOCAL DEFAULT 10 $a
- 39: 000085bc 0 NOTYPE LOCAL DEFAULT 13 $a
- 40: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
- 41: 00010608 0 OBJECT LOCAL DEFAULT 19 __JCR_LIST__
- 42: 000083ec 0 FUNC LOCAL DEFAULT 12 __do_global_dtors_aux
- 43: 000083ec 0 NOTYPE LOCAL DEFAULT 12 $a
- 44: 00008404 0 NOTYPE LOCAL DEFAULT 12 $d
- 45: 0001072c 1 OBJECT LOCAL DEFAULT 23 completed.5877
- 46: 00010604 0 OBJECT LOCAL DEFAULT 18 __do_global_dtors_aux_fin
- 47: 00010604 0 NOTYPE LOCAL DEFAULT 18 $d
- 48: 00008408 0 FUNC LOCAL DEFAULT 12 frame_dummy
- 49: 00008408 0 NOTYPE LOCAL DEFAULT 12 $a
- 50: 00008434 0 NOTYPE LOCAL DEFAULT 12 $d
- 51: 00010600 0 OBJECT LOCAL DEFAULT 17 __frame_dummy_init_array_
- 52: 00010600 0 NOTYPE LOCAL DEFAULT 17 $d
- 53: 00000000 0 FILE LOCAL DEFAULT ABS app_button.c
- 54: 0000843c 0 NOTYPE LOCAL DEFAULT 12 $a
- 55: 00008534 0 NOTYPE LOCAL DEFAULT 12 $d
- 56: 00000000 0 FILE LOCAL DEFAULT ABS elf-init.c
- 57: 00008540 0 NOTYPE LOCAL DEFAULT 12 $a
- 58: 000085ac 0 NOTYPE LOCAL DEFAULT 12 $d
- 59: 00000000 0 FILE LOCAL DEFAULT ABS crtstuff.c
- 60: 000085fc 0 OBJECT LOCAL DEFAULT 16 __FRAME_END__
- 61: 00010608 0 OBJECT LOCAL DEFAULT 19 __JCR_END__
- 62: 000106f4 0 OBJECT LOCAL HIDDEN 21 _GLOBAL_OFFSET_TABLE_
- 63: 00010604 0 NOTYPE LOCAL HIDDEN 17 __init_array_end
- 64: 00010600 0 NOTYPE LOCAL HIDDEN 17 __init_array_start
- 65: 0001060c 0 OBJECT LOCAL HIDDEN 20 _DYNAMIC
- 66: 00008314 0 NOTYPE LOCAL DEFAULT 11 $a
- 67: 00008324 0 NOTYPE LOCAL DEFAULT 11 $d
- 68: 00008328 0 NOTYPE LOCAL DEFAULT 11 $a
- 69: 00010724 0 NOTYPE WEAK DEFAULT 22 data_start
- 70: 00008328 100 FUNC GLOBAL DEFAULT UND open@@GLIBC_2.4
- 71: 00008334 740 FUNC GLOBAL DEFAULT UND abort@@GLIBC_2.4
- 72: 00008540 4 FUNC GLOBAL DEFAULT 12 __libc_csu_fini
- 73: 00008388 0 FUNC GLOBAL DEFAULT 12 _start
- 74: 00008340 604 FUNC GLOBAL DEFAULT UND __libc_start_main@@GLIBC_
- 75: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
- 76: 00000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
- 77: 000085b8 0 FUNC GLOBAL DEFAULT 13 _fini
- 78: 00008358 188 FUNC GLOBAL DEFAULT UND perror@@GLIBC_2.4
- 79: 000085c4 4 OBJECT GLOBAL DEFAULT 14 _IO_stdin_used
- 80: 00008364 100 FUNC GLOBAL DEFAULT UND read@@GLIBC_2.4
- 81: 00010724 0 NOTYPE GLOBAL DEFAULT 22 __data_start
- 82: 0001072c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__
- 83: 000085fc 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end
- 84: 00010728 0 OBJECT GLOBAL HIDDEN 22 __dso_handle
- 85: 00010730 0 NOTYPE GLOBAL DEFAULT ABS __end__
- 86: 00008544 116 FUNC GLOBAL DEFAULT 12 __libc_csu_init
- 87: 00010730 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__
- 88: 00008370 76 FUNC GLOBAL DEFAULT UND printf@@GLIBC_2.4
- 89: 0001072c 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
- 90: 00010730 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__
- 91: 00010730 0 NOTYPE GLOBAL DEFAULT ABS _end
- 92: 0001072c 0 NOTYPE GLOBAL DEFAULT ABS _edata
- 93: 000085f4 0 NOTYPE GLOBAL DEFAULT ABS __exidx_start
- 94: 0000837c 272 FUNC GLOBAL DEFAULT UND exit@@GLIBC_2.4
- 95: 0000843c 260 FUNC GLOBAL DEFAULT 12 main
- 96: 00008304 0 FUNC GLOBAL DEFAULT 10 _init
- Histogram for bucket list length (total of 3 buckets):
- Length Number % of total Coverage
- 0 0 ( 0.0%)
- 1 0 ( 0.0%) 0.0%
- 2 1 ( 33.3%) 25.0%
- 3 2 ( 66.7%) 100.0%
- Version symbols section '.gnu.version' contains 9 entries:
- Addr: 000000000000828a Offset: 0x00028a Link: 4 (.dynsym)
- 000: 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
- 004: 0 (*local*) 2 (GLIBC_2.4) 2 (GLIBC_2.4) 2 (GLIBC_2.4)
- 008: 2 (GLIBC_2.4)
- Version needs section '.gnu.version_r' contains 1 entries:
- Addr: 0x000000000000829c Offset: 0x00029c Link to section: 5 (.dynstr)
- 000000: Version: 1 File: libc.so.6 Cnt: 1
- 0x0010: Name: GLIBC_2.4 Flags: none Version: 2
- Notes at offset 0x00000148 with length 0x00000020:
- Owner Data size Description
- GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
- Attribute Section: aeabi
- File Attributes
- Tag_CPU_name: "4T"
- Tag_CPU_arch: v4T
- Tag_ARM_ISA_use: Yes
- Tag_THUMB_ISA_use: Thumb-1
- Tag_ABI_PCS_wchar_t: 4
- Tag_ABI_FP_denormal: Needed
- Tag_ABI_FP_exceptions: Needed
- Tag_ABI_FP_number_model: IEEE 754
- Tag_ABI_align8_needed: Yes
- Tag_ABI_align8_preserved: Yes, except leaf SP
- Tag_ABI_enum_size: int
复制代码 |
|