慢慢欣赏linux 内核反汇编分析

22 篇文章 1 订阅
10 篇文章 0 订阅
vmlinux:     file format elf32-i386


Disassembly 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  0x9b8516
c0400010:       b8 18 00 00 00          mov    $0x18,%eax
c0400015:       8e d8                   mov    %eax,%ds
c0400017:       8e c0                   mov    %eax,%es
c0400019:       8e e0                   mov    %eax,%fs
c040001b:       8e e8                   mov    %eax,%gs
c040001d:       fc                      cld
c040001e:       31 c0                   xor    %eax,%eax
c0400020:       bf 00 d0 a8 00          mov    $0xa8d000,%edi
c0400025:       b9 c4 7e bb 00          mov    $0xbb7ec4,%ecx
c040002a:       29 f9                   sub    %edi,%ecx
c040002c:       c1 e9 02                shr    $0x2,%ecx
c040002f:       f3 ab                   rep stos %eax,%es:(%edi)
c0400031:       bf a0 97 ab 00          mov    $0xab97a0,%edi
c0400036:       b9 00 04 00 00          mov    $0x400,%ecx
c040003b:       fc                      cld
c040003c:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)
c040003e:       8b 35 c8 99 ab 00       mov    0xab99c8,%esi
c0400044:       21 f6                   and    %esi,%esi
c0400046:       74 0c                   je     c0400054 <_text+0x54>
c0400048:       bf c0 b0 a4 00          mov    $0xa4b0c0,%edi
c040004d:       b9 00 02 00 00          mov    $0x200,%ecx
c0400052:       f3 a5                   rep movsl %ds:(%esi),%es:(%edi)
c0400054:       66 81 3d a6 99 ab 00    cmpw   $0x207,0xab99a6
c040005b:       07 02
c040005d:       72 1c                   jb     c040007b <default_entry>
c040005f:       a1 dc 99 ab 00          mov    0xab99dc,%eax
c0400064:       3d 04 00 00 00          cmp    $0x4,%eax
c0400069:       73 0e                   jae    c0400079 <lguest_entry>
c040006b:       8b 04 85 60 a8 a4 00    mov    0xa4a860(,%eax,4),%eax
c0400072:       2d 00 00 00 c0          sub    $0xc0000000,%eax
c0400077:       ff e0                   jmp    *%eax
... ...
c0a2ca9e <clocksource_default_clock>:
c0a2ca9e:       b8 80 2e 9c c0          mov    $0xc09c2e80,%eax
c0a2caa3:       c3                      ret

c0a2caa4 <init_jiffies_clocksource>:
c0a2caa4:       b8 80 2e 9c c0          mov    $0xc09c2e80,%eax
c0a2caa9:       e9 22 a6 a4 ff          jmp    c04770d0 <clocksource_register>	
										//c0a2caae + ffa4a622 == 1c09c2e80
c0a2caae <init_timer_list_procfs>:
c0a2caae:       83 ec 08                sub    $0x8,%esp
c0a2cab1:       31 c9                   xor    %ecx,%ecx
c0a2cab3:       ba 24 01 00 00          mov    $0x124,%edx
c0a2cab8:       b8 2b 56 8f c0          mov    $0xc08f562b,%eax
c0a2cabd:       c7 44 24 04 00 00 00    movl   $0x0,0x4(%esp)
c0a2cac4:       00
c0a2cac5:       c7 04 24 40 b9 7e c0    movl   $0xc07eb940,(%esp)
c0a2cacc:       e8 ef 95 b2 ff          call   c05560c0 <proc_create_data>
c0a2cad1:       83 f8 01                cmp    $0x1,%eax
c0a2cad4:       19 c0                   sbb    %eax,%eax
c0a2cad6:       83 c4 08                add    $0x8,%esp
c0a2cad9:       83 e0 f4                and    $0xfffffff4,%eax
c0a2cadc:       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/x86
arch/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 addr
arch/x86/boot/compressed/head_32.S:79:  movl    $LOAD_PHYSICAL_ADDR, %ebx
arch/x86/boot/compressed/head_32.S:152: subl    $LOAD_PHYSICAL_ADDR, %ebx
arch/x86/boot/compressed/head_64.S:94:  movl    $LOAD_PHYSICAL_ADDR, %ebx
arch/x86/boot/compressed/head_64.S:222:  * run the kernel from LOAD_PHYSICAL_ADDR
arch/x86/boot/compressed/head_64.S:237: movq    $LOAD_PHYSICAL_ADDR, %rbp
arch/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_START
CONFIG_PHYSICAL_START=0x400000
[root@test linux-2.6.32]# 

[test@test ~]$ cat /proc/kallsyms | grep clocksource_jiffies
c09c2e80 D clocksource_jiffies
[test@test ~]$ 


[test@test ~]$ cat /proc/kallsyms | grep clocksource_register
c04770d0 T clocksource_register
c0966f80 r __ksymtab_clocksource_register
c0970310 r __kcrctab_clocksource_register
c0977183 r __kstrtab_clocksource_register

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值