免费注册 查看新帖 |

Chinaunix

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

针对 elf 格式,从汇编角度讲,函数是怎么访问里面的rodata段的数据的,例如字符串? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-08-06 11:33 |只看该作者 |倒序浏览
本帖最后由 finalfantasy000 于 2013-08-06 11:36 编辑

针对 elf 格式,从汇编角度讲,函数是怎么访问里面的rodata段的数据的,例如字符串?

是通过在elf重定位的过程中,对栈指针的操作来实现的吗?

相关的寄存器有fp,lp,sp

例如,这个测试用的库,rodata里面有hellowrld字符串,库里面的函数是怎么访问它的呢?

libhello.so
architecture: arm, flags 0x00000150:
HAS_SYMS, DYNAMIC, D_PAGED
start address 0x00000000

Program Header:
    PHDR off    0x00000034 vaddr 0x00000034 paddr 0x00000034 align 2**2
         filesz 0x000000e0 memsz 0x000000e0 flags r--
    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
         filesz 0x00000440 memsz 0x00000440 flags r-x
    LOAD off    0x00000f00 vaddr 0x00001f00 paddr 0x00001f00 align 2**12
         filesz 0x00000104 memsz 0x00000104 flags rw-
DYNAMIC off    0x00000f04 vaddr 0x00001f04 paddr 0x00001f04 align 2**2
         filesz 0x000000e0 memsz 0x000000e0 flags rw-
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**0
         filesz 0x00000000 memsz 0x00000000 flags rw-
0x70000001 off    0x0000040c vaddr 0x0000040c paddr 0x0000040c align 2**2
         filesz 0x00000010 memsz 0x00000010 flags r--
   RELRO off    0x00000f00 vaddr 0x00001f00 paddr 0x00001f00 align 2**2
         filesz 0x00000100 memsz 0x00000100 flags rw-

Dynamic Section:
  PLTGOT               0x00001fe4
  PLTRELSZ             0x00000020
  JMPREL               0x000002f8
  PLTREL               0x00000011
  REL                  0x000002e8
  RELSZ                0x00000010
  RELENT               0x00000008
  RELCOUNT             0x00000002
  SYMTAB               0x00000114
  SYMENT               0x00000010
  STRTAB               0x000001f4
  STRSZ                0x000000a6
  HASH                 0x0000029c
  NEEDED               libc.so
  NEEDED               libstdc++.so
  NEEDED               libm.so
  SONAME               libhello.so
  FINI_ARRAY           0x00001f00
  FINI_ARRAYSZ         0x00000004
  SYMBOLIC             0x00000000
  FLAGS                0x0000000a
  FLAGS_1              0x00000001
private flags = 5000000: [Version5 EABI]
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .dynsym       000000e0  00000114  00000114  00000114  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .dynstr       000000a6  000001f4  000001f4  000001f4  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  2 .hash         0000004c  0000029c  0000029c  0000029c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .rel.dyn      00000010  000002e8  000002e8  000002e8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .rel.plt      00000020  000002f8  000002f8  000002f8  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  5 .plt          00000044  00000318  00000318  00000318  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  6 .text         000000b0  0000035c  0000035c  0000035c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  7 .ARM.exidx    00000010  0000040c  0000040c  0000040c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  8 .rodata       00000024  0000041c  0000041c  0000041c  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  9 .fini_array   00000004  00001f00  00001f00  00000f00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
10 .dynamic      000000e0  00001f04  00001f04  00000f04  2**2
                  CONTENTS, ALLOC, LOAD, DATA
11 .got          0000001c  00001fe4  00001fe4  00000fe4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
12 .data         00000004  00002000  00002000  00001000  2**2
                  CONTENTS, ALLOC, LOAD, DATA
13 .comment      0000002f  00000000  00000000  00001004  2**0
                  CONTENTS, READONLY
14 .debug_info   00000265  00000000  00000000  00001033  2**0
                  CONTENTS, READONLY, DEBUGGING
15 .debug_abbrev 00000158  00000000  00000000  00001298  2**0
                  CONTENTS, READONLY, DEBUGGING
16 .debug_loc    00000044  00000000  00000000  000013f0  2**0
                  CONTENTS, READONLY, DEBUGGING
17 .debug_pubnames 00000080  00000000  00000000  00001434  2**0
                  CONTENTS, READONLY, DEBUGGING
18 .debug_pubtypes 00000261  00000000  00000000  000014b4  2**0
                  CONTENTS, READONLY, DEBUGGING
19 .debug_aranges 00000070  00000000  00000000  00001715  2**0
                  CONTENTS, READONLY, DEBUGGING
20 .debug_ranges 00000040  00000000  00000000  00001785  2**0
                  CONTENTS, READONLY, DEBUGGING
21 .debug_line   00000136  00000000  00000000  000017c5  2**0
                  CONTENTS, READONLY, DEBUGGING
22 .debug_str    0000018c  00000000  00000000  000018fb  2**0
                  CONTENTS, READONLY, DEBUGGING
23 .debug_frame  00000080  00000000  00000000  00001a88  2**2
                  CONTENTS, READONLY, DEBUGGING
24 .note.gnu.gold-version 0000001c  00000000  00000000  00001b08  2**2
                  CONTENTS, READONLY, LINK_ONCE_SAME_CONTENTS
25 .ARM.attributes 00000036  00000000  00000000  00001b24  2**0
                  CONTENTS, READONLY
SYMBOL TABLE:
00000000 l    df *ABS*        00000000 crtbegin_so.c
00000000 l    df *ABS*        00000000 hello.c
00000000 l    df *ABS*        00000000 add.c
00000000 l    df *ABS*        00000000 sub.c
0000035c l     F .text        00000020 .hidden __on_dlclose
00002000 l     O .data        00000004 .hidden __dso_handle
0000037c l     F .text        00000040 .hidden atexit
00001f04 l     O .dynamic        000000e0 .hidden _DYNAMIC
00001fe4 l     O .got        00000000 .hidden _GLOBAL_OFFSET_TABLE_
00000000       F *UND*        00000000 __cxa_finalize
00000000       F *UND*        00000000 __cxa_atexit
000003bc g     F .text        00000010 hello
00000000       F *UND*        00000000 printf
00000000       F *UND*        00000000 __aeabi_unwind_cpp_pr0
000003cc g     F .text        0000000c helloGlobal
00000000       F *UND*        00000000 puts
000003d8 g     F .text        0000000c helloLocal
000003e4 g     F .text        00000004 add
000003e8 g     F .text        00000004 sub
00002004 g       *ABS*        00000000 _edata
00002004 g       *ABS*        00000000 __bss_start
00002004 g       *ABS*        00000000 _end



Disassembly of section .dynsym:

00000114 <.dynsym>:
        ...
124:        00000001         andeq        r0, r0, r1
        ...
130:        00000012         andeq        r0, r0, r2, lsl r0
134:        00000010         andeq        r0, r0, r0, lsl r0
        ...
140:        00000012         andeq        r0, r0, r2, lsl r0
144:        0000001d         andeq        r0, r0, sp, lsl r0
148:        000003bd                         ; <UNDEFINED> instruction: 0x000003bd
14c:        00000010         andeq        r0, r0, r0, lsl r0
150:        00070012         andeq        r0, r7, r2, lsl r0
154:        00000023         andeq        r0, r0, r3, lsr #32
        ...
160:        00000012         andeq        r0, r0, r2, lsl r0
164:        0000002a         andeq        r0, r0, sl, lsr #32
        ...
170:        00000012         andeq        r0, r0, r2, lsl r0
174:        00000041         andeq        r0, r0, r1, asr #32
178:        000003cd         andeq        r0, r0, sp, asr #7
17c:        0000000c         andeq        r0, r0, ip
180:        00070012         andeq        r0, r7, r2, lsl r0
184:        0000004d         andeq        r0, r0, sp, asr #32
        ...
190:        00000012         andeq        r0, r0, r2, lsl r0
194:        00000052         andeq        r0, r0, r2, asr r0
198:        000003d9         ldrdeq        r0, [r0], -r9
19c:        0000000c         andeq        r0, r0, ip
1a0:        00070012         andeq        r0, r7, r2, lsl r0
1a4:        0000005d         andeq        r0, r0, sp, asr r0
1a8:        000003e5         andeq        r0, r0, r5, ror #7
1ac:        00000004         andeq        r0, r0, r4
1b0:        00070012         andeq        r0, r7, r2, lsl r0
1b4:        00000061         andeq        r0, r0, r1, rrx
1b8:        000003e9         andeq        r0, r0, r9, ror #7
1bc:        00000004         andeq        r0, r0, r4
1c0:        00070012         andeq        r0, r7, r2, lsl r0
1c4:        00000065         andeq        r0, r0, r5, rrx
1c8:        00002004         andeq        r2, r0, r4
1cc:        00000000         andeq        r0, r0, r0
1d0:        fff10010                         ; <UNDEFINED> instruction: 0xfff10010
1d4:        0000006c         andeq        r0, r0, ip, rrx
1d8:        00002004         andeq        r2, r0, r4
1dc:        00000000         andeq        r0, r0, r0
1e0:        fff10010                         ; <UNDEFINED> instruction: 0xfff10010
1e4:        00000078         andeq        r0, r0, r8, ror r0
1e8:        00002004         andeq        r2, r0, r4
1ec:        00000000         andeq        r0, r0, r0
1f0:        fff10010                         ; <UNDEFINED> instruction: 0xfff10010

Disassembly of section .dynstr:

000001f4 <.dynstr>:
1f4:        635f5f00         cmpvs        pc, #0
1f8:        665f6178                         ; <UNDEFINED> instruction: 0x665f6178
1fc:        6c616e69         stclvs        14, cr6, [r1], #-420        ; 0xfffffe5c
200:        00657a69         rsbeq        r7, r5, r9, ror #20
204:        78635f5f         stmdavc        r3!, {r0, r1, r2, r3, r4, r6, r8, r9, sl, fp, ip, lr}^
208:        74615f61         strbtvc        r5, [r1], #-3937        ; 0xf61
20c:        74697865         strbtvc        r7, [r9], #-2149        ; 0x865
210:        6c656800         stclvs        8, cr6, [r5]
214:        70006f6c         andvc        r6, r0, ip, ror #30
218:        746e6972         strbtvc        r6, [lr], #-2418        ; 0x972
21c:        5f5f0066         svcpl        0x005f0066
220:        62616561         rsbvs        r6, r1, #406847488        ; 0x18400000
224:        6e755f69         cdpvs        15, 7, cr5, cr5, cr9, {3}
228:        646e6977         strbtvs        r6, [lr], #-2423        ; 0x977
22c:        7070635f         rsbsvc        r6, r0, pc, asr r3
230:        3072705f         rsbscc        r7, r2, pc, asr r0
234:        6c656800         stclvs        8, cr6, [r5]
238:        6c476f6c         mcrrvs        15, 6, r6, r7, cr12
23c:        6c61626f         sfmvs        f6, 2, [r1], #-444        ; 0xfffffe44
240:        74757000         ldrbtvc        r7, [r5]
244:        65680073         strbvs        r0, [r8, #-115]!        ; 0x73
248:        4c6f6c6c         stclmi        12, cr6, [pc], #-432        ; a0 <__on_dlclose-0x2bc>
24c:        6c61636f         stclvs        3, cr6, [r1], #-444        ; 0xfffffe44
250:        64646100         strbtvs        r6, [r4], #-256        ; 0x100
254:        62757300         rsbsvs        r7, r5, #0
258:        64655f00         strbtvs        r5, [r5], #-3840        ; 0xf00
25c:        00617461         rsbeq        r7, r1, r1, ror #8
260:        73625f5f         cmnvc        r2, #380        ; 0x17c
264:        74735f73         ldrbtvc        r5, [r3], #-3955        ; 0xf73
268:        00747261         rsbseq        r7, r4, r1, ror #4
26c:        646e655f         strbtvs        r6, [lr], #-1375        ; 0x55f
270:        62696c00         rsbvs        r6, r9, #0
274:        6f732e63         svcvs        0x00732e63
278:        62696c00         rsbvs        r6, r9, #0
27c:        63647473         cmnvs        r4, #1929379840        ; 0x73000000
280:        732e2b2b         teqvc        lr, #44032        ; 0xac00
284:        696c006f         stmdbvs        ip!, {r0, r1, r2, r3, r5, r6}^
288:        732e6d62         teqvc        lr, #6272        ; 0x1880
28c:        696c006f         stmdbvs        ip!, {r0, r1, r2, r3, r5, r6}^
290:        6c656862         stclvs        8, cr6, [r5], #-392        ; 0xfffffe78
294:        732e6f6c         teqvc        lr, #432        ; 0x1b0
298:        Address 0x0000000000000298 is out of bounds.


Disassembly of section .hash:

0000029c <.hash>:
29c:        00000003         andeq        r0, r0, r3
2a0:        0000000e         andeq        r0, r0, lr
2a4:        0000000b         andeq        r0, r0, fp
2a8:        0000000d         andeq        r0, r0, sp
2ac:        0000000c         andeq        r0, r0, ip
        ...
2bc:        00000002         andeq        r0, r0, r2
2c0:        00000001         andeq        r0, r0, r1
2c4:        00000003         andeq        r0, r0, r3
2c8:        00000005         andeq        r0, r0, r5
2cc:        00000006         andeq        r0, r0, r6
2d0:        00000004         andeq        r0, r0, r4
2d4:        00000000         andeq        r0, r0, r0
2d8:        00000009         andeq        r0, r0, r9
2dc:        0000000a         andeq        r0, r0, sl
2e0:        00000008         andeq        r0, r0, r8
2e4:        00000007         andeq        r0, r0, r7

Disassembly of section .rel.dyn:

000002e8 <.rel.dyn>:
2e8:        00001f00         andeq        r1, r0, r0, lsl #30
2ec:        00000017         andeq        r0, r0, r7, lsl r0
2f0:        00002000         andeq        r2, r0, r0
2f4:        00000017         andeq        r0, r0, r7, lsl r0

Disassembly of section .rel.plt:

000002f8 <.rel.plt>:
2f8:        00001ff0         strdeq        r1, [r0], -r0
2fc:        00000116         andeq        r0, r0, r6, lsl r1
300:        00001ff4         strdeq        r1, [r0], -r4
304:        00000216         andeq        r0, r0, r6, lsl r2
308:        00001ff8         strdeq        r1, [r0], -r8
30c:        00000416         andeq        r0, r0, r6, lsl r4
310:        00001ffc         strdeq        r1, [r0], -ip
314:        00000716         andeq        r0, r0, r6, lsl r7

Disassembly of section .plt:

00000318 <.plt>:
318:        e52de004         push        {lr}                ; (str lr, [sp, #-4]!)
31c:        e59fe004         ldr        lr, [pc, #4]        ; 328 <__on_dlclose-0x34>
320:        e08fe00e         add        lr, pc, lr
324:        e5bef008         ldr        pc, [lr, #8]!
328:        00001cbc                         ; <UNDEFINED> instruction: 0x00001cbc
32c:        e28fc600         add        ip, pc, #0
330:        e28cca01         add        ip, ip, #4096        ; 0x1000
334:        e5bcfcbc         ldr        pc, [ip, #3260]!        ; 0xcbc
338:        e28fc600         add        ip, pc, #0
33c:        e28cca01         add        ip, ip, #4096        ; 0x1000
340:        e5bcfcb4         ldr        pc, [ip, #3252]!        ; 0xcb4
344:        e28fc600         add        ip, pc, #0
348:        e28cca01         add        ip, ip, #4096        ; 0x1000
34c:        e5bcfcac         ldr        pc, [ip, #3244]!        ; 0xcac
350:        e28fc600         add        ip, pc, #0
354:        e28cca01         add        ip, ip, #4096        ; 0x1000
358:        e5bcfca4         ldr        pc, [ip, #3236]!        ; 0xca4

Disassembly of section .text:

0000035c <__on_dlclose>:
35c:        e92d4800         push        {fp, lr}
360:        e28db004         add        fp, sp, #4
364:        e59f300c         ldr        r3, [pc, #12]        ; 378 <__on_dlclose+0x1c>
368:        e08f3003         add        r3, pc, r3
36c:        e1a00003         mov        r0, r3
370:        ebffffed         bl        32c <__on_dlclose-0x30>
374:        e8bd8800         pop        {fp, pc}
378:        00001c90         muleq        r0, r0, ip

0000037c <atexit>:
37c:        e92d4800         push        {fp, lr}
380:        e28db004         add        fp, sp, #4
384:        e24dd008         sub        sp, sp, #8
388:        e50b0008         str        r0, [fp, #-8]
38c:        e51b3008         ldr        r3, [fp, #-8]
390:        e1a00003         mov        r0, r3
394:        e3a01000         mov        r1, #0
398:        e59f3018         ldr        r3, [pc, #24]        ; 3b8 <atexit+0x3c>
39c:        e08f3003         add        r3, pc, r3
3a0:        e1a02003         mov        r2, r3
3a4:        ebffffe3         bl        338 <__on_dlclose-0x24>
3a8:        e1a03000         mov        r3, r0
3ac:        e1a00003         mov        r0, r3
3b0:        e24bd004         sub        sp, fp, #4
3b4:        e8bd8800         pop        {fp, pc}
3b8:        00001c5c         andeq        r1, r0, ip, asr ip

000003bc <hello>:
3bc:        4601              mov        r1, r0
3be:        4802              ldr        r0, [pc, #8]        ; (3c8 <hello+0xc>
3c0:        4478              add        r0, pc
3c2:        f000 b813         b.w        3ec <sub+0x4>
3c6:        bf00              nop
3c8:        00000058         andeq        r0, r0, r8, asr r0

000003cc <helloGlobal>:
3cc:        4801              ldr        r0, [pc, #4]        ; (3d4 <helloGlobal+0x8>
3ce:        4478              add        r0, pc
3d0:        f000 b814         b.w        3fc <sub+0x14>
3d4:        00000055         andeq        r0, r0, r5, asr r0

000003d8 <helloLocal>:
3d8:        4801              ldr        r0, [pc, #4]        ; (3e0 <helloLocal+0x8>
3da:        4478              add        r0, pc
3dc:        f000 b80e         b.w        3fc <sub+0x14>
3e0:        00000056         andeq        r0, r0, r6, asr r0

000003e4 <add>:
3e4:        1840              adds        r0, r0, r1
3e6:        4770              bx        lr

000003e8 <sub>:
3e8:        1a40              subs        r0, r0, r1
3ea:        4770              bx        lr
3ec:        4778              bx        pc
3ee:        46c0              nop                        ; (mov r8, r
3f0:        c000              stmia        r0!, {}
3f2:        e59f              b.n        ffffff34 <__bss_start+0xffffdf30>
3f4:        f00f e08c         blx        40f510 <__bss_start+0x40d50c>
3f8:        ff48 ffff                         ; <UNDEFINED> instruction: 0xff48ffff
3fc:        4778              bx        pc
3fe:        46c0              nop                        ; (mov r8, r
400:        c000              stmia        r0!, {}
402:        e59f              b.n        ffffff44 <__bss_start+0xffffdf40>
404:        f00f e08c         blx        40f520 <__bss_start+0x40d51c>
408:        ff44 ffff                         ; <UNDEFINED> instruction: 0xff44ffff

Disassembly of section .ARM.exidx:

0000040c <.ARM.exidx>:
40c:        7fffffb0         svcvc        0x00ffffb0
410:        80b0b0b0         ldrhthi        fp, [r0], r0
414:        7ffffff8         svcvc        0x00fffff8
418:        00000001         andeq        r0, r0, r1

Disassembly of section .rodata:

0000041c <.rodata>:
41c:        6c6c6548         cfstr64vs        mvdx6, [ip], #-288        ; 0xfffffee0
420:        7325206f         teqvc        r5, #111        ; 0x6f
424:        68000a21         stmdavs        r0, {r0, r5, r9, fp}
428:        6f6c6c65         svcvs        0x006c6c65
42c:        6f6c6720         svcvs        0x006c6720
430:        006c6162         rsbeq        r6, ip, r2, ror #2
434:        6c6c6568         cfstr64vs        mvdx6, [ip], #-416        ; 0xfffffe60
438:        6f6c206f         svcvs        0x006c206f
43c:        006c6163         rsbeq        r6, ip, r3, ror #2

Disassembly of section .fini_array:

00001f00 <.fini_array>:
    1f00:        0000035c         andeq        r0, r0, ip, asr r3

Disassembly of section .dynamic:

00001f04 <_DYNAMIC>:
    1f04:        00000003         andeq        r0, r0, r3
    1f08:        00001fe4         andeq        r1, r0, r4, ror #31
    1f0c:        00000002         andeq        r0, r0, r2
    1f10:        00000020         andeq        r0, r0, r0, lsr #32
    1f14:        00000017         andeq        r0, r0, r7, lsl r0
    1f18:        000002f8         strdeq        r0, [r0], -r8
    1f1c:        00000014         andeq        r0, r0, r4, lsl r0
    1f20:        00000011         andeq        r0, r0, r1, lsl r0
    1f24:        00000011         andeq        r0, r0, r1, lsl r0
    1f28:        000002e8         andeq        r0, r0, r8, ror #5
    1f2c:        00000012         andeq        r0, r0, r2, lsl r0
    1f30:        00000010         andeq        r0, r0, r0, lsl r0
    1f34:        00000013         andeq        r0, r0, r3, lsl r0
    1f38:        00000008         andeq        r0, r0, r8
    1f3c:        6ffffffa         svcvs        0x00fffffa
    1f40:        00000002         andeq        r0, r0, r2
    1f44:        00000006         andeq        r0, r0, r6
    1f48:        00000114         andeq        r0, r0, r4, lsl r1
    1f4c:        0000000b         andeq        r0, r0, fp
    1f50:        00000010         andeq        r0, r0, r0, lsl r0
    1f54:        00000005         andeq        r0, r0, r5
    1f58:        000001f4         strdeq        r0, [r0], -r4
    1f5c:        0000000a         andeq        r0, r0, sl
    1f60:        000000a6         andeq        r0, r0, r6, lsr #1
    1f64:        00000004         andeq        r0, r0, r4
    1f68:        0000029c         muleq        r0, ip, r2
    1f6c:        00000001         andeq        r0, r0, r1
    1f70:        0000007d         andeq        r0, r0, sp, ror r0
    1f74:        00000001         andeq        r0, r0, r1
    1f78:        00000085         andeq        r0, r0, r5, lsl #1
    1f7c:        00000001         andeq        r0, r0, r1
    1f80:        00000092         muleq        r0, r2, r0
    1f84:        0000000e         andeq        r0, r0, lr
    1f88:        0000009a         muleq        r0, sl, r0
    1f8c:        0000001a         andeq        r0, r0, sl, lsl r0
    1f90:        00001f00         andeq        r1, r0, r0, lsl #30
    1f94:        0000001c         andeq        r0, r0, ip, lsl r0
    1f98:        00000004         andeq        r0, r0, r4
    1f9c:        00000010         andeq        r0, r0, r0, lsl r0
    1fa0:        00000000         andeq        r0, r0, r0
    1fa4:        0000001e         andeq        r0, r0, lr, lsl r0
    1fa8:        0000000a         andeq        r0, r0, sl
    1fac:        6ffffffb         svcvs        0x00fffffb
    1fb0:        00000001         andeq        r0, r0, r1
        ...

Disassembly of section .got:

00001fe4 <_GLOBAL_OFFSET_TABLE_>:
        ...
    1ff0:        00000318         andeq        r0, r0, r8, lsl r3
    1ff4:        00000318         andeq        r0, r0, r8, lsl r3
    1ff8:        00000318         andeq        r0, r0, r8, lsl r3
    1ffc:        00000318         andeq        r0, r0, r8, lsl r3

Disassembly of section .data:

00002000 <__dso_handle>:
    2000:        00002000         andeq        r2, r0, r0

Disassembly of section .comment:

00000000 <.comment>:
   0:        43434700         movtmi        r4, #14080        ; 0x3700
   4:        4728203a                         ; <UNDEFINED> instruction: 0x4728203a
   8:        2029554e         eorcs        r5, r9, lr, asr #10
   c:        2e362e34         mrccs        14, 1, r2, cr6, cr4, {1}
  10:        6f672d78         svcvs        0x00672d78
  14:        656c676f         strbvs        r6, [ip, #-1903]!        ; 0x76f
  18:        31303220         teqcc        r0, r0, lsr #4
  1c:        30313032         eorscc        r3, r1, r2, lsr r0
  20:        70282036         eorvc        r2, r8, r6, lsr r0
  24:        65726572         ldrbvs        r6, [r2, #-1394]!        ; 0x572
  28:        7361656c         cmnvc        r1, #452984832        ; 0x1b000000
  2c:        Address 0x000000000000002c is out of bounds.


Disassembly of section .note.gnu.gold-version:

00000000 <.note.gnu.gold-version>:
   0:        00000004         andeq        r0, r0, r4
   4:        00000009         andeq        r0, r0, r9
   8:        00000004         andeq        r0, r0, r4
   c:        00554e47         subseq        r4, r5, r7, asr #28
  10:        646c6f67         strbtvs        r6, [ip], #-3943        ; 0xf67
  14:        312e3120         teqcc        lr, r0, lsr #2
  18:        00000030         andeq        r0, r0, r0, lsr r0

Disassembly of section .ARM.attributes:

00000000 <.ARM.attributes>:
   0:        00003541         andeq        r3, r0, r1, asr #10
   4:        61656100         cmnvs        r5, r0, lsl #2
   8:        01006962         tsteq        r0, r2, ror #18
   c:        0000002b         andeq        r0, r0, fp, lsr #32
  10:        4d524105         ldfmie        f4, [r2, #-20]        ; 0xffffffec
  14:        00377620         eorseq        r7, r7, r0, lsr #12
  18:        41070a06         tstmi        r7, r6, lsl #20
  1c:        02090108         andeq        r0, r9, #2
  20:        010c030a         tsteq        ip, sl, lsl #6
  24:        01140412         tsteq        r4, r2, lsl r4
  28:        03170115         tsteq        r7, #1073741829        ; 0x40000005
  2c:        021a0118         andseq        r0, sl, #6
  30:        061e031b                         ; <UNDEFINED> instruction: 0x061e031b
  34:        Address 0x0000000000000034 is out of bounds.

论坛徽章:
1
2015年迎新春徽章
日期:2015-03-04 09:53:17
2 [报告]
发表于 2013-08-06 13:13 |只看该作者
对于可执行elf来说,库函数是浮动的,由pltgot 搞定,而数据字符串是本地数据,他的的位置是连接的时候确定,然后回填引用他的指令操作数。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP