Results 1 to 3 of 3
Hello,
I am trying to look into the Linux kernel and see how Linux reads the CPU Information, etc. The kernel has these files with .o extension. Was wondering how ...
- 10-04-2004 #1Just Joined!
- Join Date
- Sep 2004
- Posts
- 26
How do i read a .o file?
Hello,
I am trying to look into the Linux kernel and see how Linux reads the CPU Information, etc. The kernel has these files with .o extension. Was wondering how to read them, if possible?
Regards,
Shivanu
- 10-04-2004 #2
Re: How do i read a .o file?
As far as I know, you can't read .o files. They're compiled object files which I believe are used by applications to build modules for your kernel.
Originally Posted by shivanu Registered Linux user #270181
TechieMoe's Tech Rants
- 10-21-2004 #3Linux User
- Join Date
- Oct 2004
- Location
- /dev/random
- Posts
- 404
If you're talking about finding out how the code in .o file works (kind of reverse-compiling) then, it's not possible - at least I don't know how to do it. You can disassemble the file though producing the assembly code from the file. But, you can still find out a lot of useful information about the .o file using the program objdump. If the .o file is an ELF executable, you can even try out readelf.
Now, coming to the main purpose of your exercise, linux won't simply allow that. Finding out how kernel works while it is running is not possible because linux is a protected-mode operating system - which means that the normal user programs do not have access to any kernel-level data structures. The kernel functionality is to be called from user programs using well-defined ways (system calls).
The best way to find that out is to check the kernel source code itself - which is freely available anyway
The Unforgiven
Registered Linux User #358564


Reply With Quote
