Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7889951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:13:45+00:00 2026-06-03T06:13:45+00:00

I need to disassemble /proc/kcore file in Linux and I need to obtain virtual

  • 0

I need to disassemble /proc/kcore file in Linux and I need to obtain virtual addresses of some special instructions to put kprobes later on it. According to this document /proc/kcore is an image of physical memory, but in this question someone answered that it is kernel’s virtual memory (exactly what I am looking for).

When I use objdump tool to disassemble it, it starts with address something like f7c0b000, but udis86 starts with 0x0 (and totally different instruction). When I try to grep some specific instruction, let’s say mov 0xf7c1d60c,%edx, I got:

objdump

f7c0b022 mov    0xf7c1d60c,%edx

udis86

290ec02a mov    0xf7c1d60c,%edx

It looks like the offset between udis86 and objdump is always 0xbffff000. Why so strange offset? How can I obtain virtual address of specific instruction? Somewhere I’ve read, that kernel is statically mapped at virtual address 0xc0000000 + 0x100000. If /proc/kcore is really physical image, is it correct only to add 0x100000 to addresses returned by objdump and I will get virtual address?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:13:46+00:00Added an answer on June 3, 2026 at 6:13 am

    objdump understands ELF format files (such as /proc/kcore). It is able to extract the executable sections of the file while ignoring non-executable content (such as .note sections).

    You can see the structure of an ELF exectuable using the -h flag, for example:

    # objdump -h /proc/kcore
    /proc/kcore:     file format elf64-x86-64
    
    Sections:
    Idx Name          Size      VMA               LMA               File off  Algn
      0 note0         00001944  0000000000000000  0000000000000000  000002a8  2**0
                      CONTENTS, READONLY
      1 .reg/0        000000d8  0000000000000000  0000000000000000  0000032c  2**2
                      CONTENTS
      2 .reg          000000d8  0000000000000000  0000000000000000  0000032c  2**2
                      CONTENTS
      3 load1         00800000  ffffffffff600000  0000000000000000  7fffff602000  2**12
                      CONTENTS, ALLOC, LOAD, CODE
    (...)
    

    It looks like the udcli tool from udis86 probably starts disassembling things from the beginning of the file, which suggests that your output will probably start with a bunch of irrelevant output and it’s up to you to figure out where execution starts.

    UPDATE

    Here’s the verification. We use this answer to extract the first load section from /proc/kcore, like this:

    # dd if=/proc/kcore of=mysection bs=1 skip=$[0x7fffff602000] count=$[0x00800000]
    

    And now if we view that with udcli:

    # udcli mysection
    0000000000000000 48               dec eax                 
    0000000000000001 c7c060000000     mov eax, 0x60           
    0000000000000007 0f05             syscall                 
    0000000000000009 c3               ret                     
    000000000000000a cc               int3                    
    000000000000000b cc               int3                    
    

    We see that it looks almost identical to the output of objdump -d /proc/kcore:

    # objdump -d /proc/kcore
    /proc/kcore:     file format elf64-x86-64
    
    
    Disassembly of section load1:
    
    ffffffffff600000 <load1>:
    ffffffffff600000:       48 c7 c0 60 00 00 00    mov    $0x60,%rax
    ffffffffff600007:       0f 05                   syscall 
    ffffffffff600009:       c3                      retq   
    ffffffffff60000a:       cc                      int3   
    ffffffffff60000b:       cc                      int3   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to disassemble an executable file made from C . My lecturer said
Need some help for creating a File and String search engine. The program needs
I have swf file with some graphics I need to use in my haxe(future
Need to insert selected text on the page into textarea. There must be some
Need to call a filter function on some options based on a radio selected
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some advice on how to optimize my articles table for read operations. I
Need to login and download xml file from the below url : http://www.radionyhetene.net/download/nyheter/mp3/nyheter.xml I
Need some help. I have a table with some columns..like name , phone etc...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.