博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
慢慢欣赏linux 内核反汇编分析
阅读量:4069 次
发布时间:2019-05-25

本文共 4222 字,大约阅读时间需要 14 分钟。

vmlinux:     file format elf32-i386Disassembly of section .text:c0400000 <_text>:c0400000:       f6 86 11 02 00 00 40    testb  $0x40,0x211(%esi)c0400007:       75 14                   jne    c040001d <_text+0x1d>c0400009:       0f 01 15 16 85 9b 00    lgdtl  0x9b8516c0400010:       b8 18 00 00 00          mov    $0x18,%eaxc0400015:       8e d8                   mov    %eax,%dsc0400017:       8e c0                   mov    %eax,%esc0400019:       8e e0                   mov    %eax,%fsc040001b:       8e e8                   mov    %eax,%gsc040001d:       fc                      cldc040001e:       31 c0                   xor    %eax,%eaxc0400020:       bf 00 d0 a8 00          mov    $0xa8d000,%edic0400025:       b9 c4 7e bb 00          mov    $0xbb7ec4,%ecxc040002a:       29 f9                   sub    %edi,%ecxc040002c:       c1 e9 02                shr    $0x2,%ecxc040002f:       f3 ab                   rep stos %eax,%es:(%edi)c0400031:       bf a0 97 ab 00          mov    $0xab97a0,%edic0400036:       b9 00 04 00 00          mov    $0x400,%ecxc040003b:       fc                      cldc040003c:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)c040003e:       8b 35 c8 99 ab 00       mov    0xab99c8,%esic0400044:       21 f6                   and    %esi,%esic0400046:       74 0c                   je     c0400054 <_text+0x54>c0400048:       bf c0 b0 a4 00          mov    $0xa4b0c0,%edic040004d:       b9 00 02 00 00          mov    $0x200,%ecxc0400052:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)c0400054:       66 81 3d a6 99 ab 00    cmpw   $0x207,0xab99a6c040005b:       07 02c040005d:       72 1c                   jb     c040007b 
c040005f: a1 dc 99 ab 00 mov 0xab99dc,%eaxc0400064: 3d 04 00 00 00 cmp $0x4,%eaxc0400069: 73 0e jae c0400079
c040006b: 8b 04 85 60 a8 a4 00 mov 0xa4a860(,%eax,4),%eaxc0400072: 2d 00 00 00 c0 sub $0xc0000000,%eaxc0400077: ff e0 jmp *%eax... ...c0a2ca9e
:c0a2ca9e: b8 80 2e 9c c0 mov $0xc09c2e80,%eaxc0a2caa3: c3 retc0a2caa4
:c0a2caa4: b8 80 2e 9c c0 mov $0xc09c2e80,%eaxc0a2caa9: e9 22 a6 a4 ff jmp c04770d0
//c0a2caae + ffa4a622 == 1c09c2e80c0a2caae
:c0a2caae: 83 ec 08 sub $0x8,%espc0a2cab1: 31 c9 xor %ecx,%ecxc0a2cab3: ba 24 01 00 00 mov $0x124,%edxc0a2cab8: b8 2b 56 8f c0 mov $0xc08f562b,%eaxc0a2cabd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)c0a2cac4: 00c0a2cac5: c7 04 24 40 b9 7e c0 movl $0xc07eb940,(%esp)c0a2cacc: e8 ef 95 b2 ff call c05560c0
c0a2cad1: 83 f8 01 cmp $0x1,%eaxc0a2cad4: 19 c0 sbb %eax,%eaxc0a2cad6: 83 c4 08 add $0x8,%espc0a2cad9: 83 e0 f4 and $0xfffffff4,%eaxc0a2cadc: c3 ret[root@test linux-2.6.32]# cat .config | grep LOAD_PHYSICAL_ADDR[root@test linux-2.6.32]# [root@test linux-2.6.32]# grep -rn LOAD_PHYSICAL_ADDR arch/x86arch/x86/include/asm/boot.h:14:#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \arch/x86/kernel/vmlinux.lds.S:60: . = LOAD_OFFSET + LOAD_PHYSICAL_ADDR;arch/x86/boot/header.S:227:pref_address: .quad LOAD_PHYSICAL_ADDR # preferred load addrarch/x86/boot/compressed/head_32.S:79: movl $LOAD_PHYSICAL_ADDR, %ebxarch/x86/boot/compressed/head_32.S:152: subl $LOAD_PHYSICAL_ADDR, %ebxarch/x86/boot/compressed/head_64.S:94: movl $LOAD_PHYSICAL_ADDR, %ebxarch/x86/boot/compressed/head_64.S:222: * run the kernel from LOAD_PHYSICAL_ADDRarch/x86/boot/compressed/head_64.S:237: movq $LOAD_PHYSICAL_ADDR, %rbparch/x86/boot/compressed/misc.c:291: dest += (phdr->p_paddr - LOAD_PHYSICAL_ADDR);arch/x86/boot/compressed/misc.c:338: if ((unsigned long)output != LOAD_PHYSICAL_ADDR)[root@test linux-2.6.32]# cat .config | grep CONFIG_PHYSICAL_STARTCONFIG_PHYSICAL_START=0x400000[root@test linux-2.6.32]# [test@test ~]$ cat /proc/kallsyms | grep clocksource_jiffiesc09c2e80 D clocksource_jiffies[test@test ~]$ [test@test ~]$ cat /proc/kallsyms | grep clocksource_registerc04770d0 T clocksource_registerc0966f80 r __ksymtab_clocksource_registerc0970310 r __kcrctab_clocksource_registerc0977183 r __kstrtab_clocksource_register

 

转载地址:http://kblji.baihongyu.com/

你可能感兴趣的文章
SIGN UP BEC2
查看>>
S3C2440中对LED驱动电路的理解
查看>>
《天亮了》韩红
查看>>
Windows CE下USB摄像头驱动开发(以OV511为例,附带全部源代码以及讲解) [转]
查看>>
出现( linker command failed with exit code 1)错误总结
查看>>
iOS开发中一些常见的并行处理
查看>>
iOS获取手机的Mac地址
查看>>
ios7.1发布企业证书测试包的问题
查看>>
如何自定义iOS中的控件
查看>>
iOS 开发百问
查看>>
Mac环境下svn的使用
查看>>
github简单使用教程
查看>>
如何高效利用GitHub
查看>>
环境分支-git版本管理
查看>>
uni-app 全局变量
查看>>
js判断空对象的几种方法
查看>>
java 不用递归写tree
查看>>
springboot2 集成Hibernate JPA 用 声明式事物
查看>>
fhs-framework jetcache 缓存维护之自动清除缓存
查看>>
SpringBoot 动态编译 JAVA class 解决 jar in jar 的依赖问题
查看>>