Showing posts with label Kernel. Show all posts
Showing posts with label Kernel. Show all posts
Wednesday, September 18, 2013
How kernel compiler c library work together
http://wiki.osdev.org/How_kernel,_compiler,_and_C_library_work_together
Labels:
C/C++,
compiler,
Kernel,
Linux,
OS,
Programming,
Software Engineering
Tuesday, September 17, 2013
Difference between .o and .ko file
http://stackoverflow.com/questions/10476990/difference-between-o-and-ko-file
The short answer is that the .ko file is your
object file linked with some kernel automatically generated data
structures that are needed by the kernel.
The .o file is the object file of your modules - the result of compiling your c files. The kernel build system then automatically creates another C file with some data structures describing the kernel module (named your_module_kmod.c), compile this C file into another object file and links your object file and the object file it built together to create the .ko file.
The dynamic linker in the kernel that is in charge of loading kernel modules, expects to find the data structure the kernel put in the kmod object in the .ko file and will not be able to load your kernel module without them
The .o file is the object file of your modules - the result of compiling your c files. The kernel build system then automatically creates another C file with some data structures describing the kernel module (named your_module_kmod.c), compile this C file into another object file and links your object file and the object file it built together to create the .ko file.
The dynamic linker in the kernel that is in charge of loading kernel modules, expects to find the data structure the kernel put in the kmod object in the .ko file and will not be able to load your kernel module without them
Saturday, July 28, 2012
Writing a Linux device driver module for kernel 3.0 or 2.6 with udev
http://pete.akeo.ie/2011/08/writing-linux-device-driver-for-kernels.html
Sunday, July 1, 2012
Loading and unloading modules in Linux
# /sbin/lsmod
List of modules and the programs /kernel use
http://www.techrepublic.com/article/loading-and-unloading-modules-in-linux/5031591
rmmod ppp
List of modules and the programs /kernel use
http://www.techrepublic.com/article/loading-and-unloading-modules-in-linux/5031591
rmmod ppp
Thursday, February 2, 2012
View ubuntu log files
http://www.cyberciti.biz/faq/ubuntu-linux-gnome-system-log-viewer/
Compile a kernel in Ubuntu Way
http://www.howtoforge.com/kernel_compilation_ubuntu_p2
Compile a kernel in Ubuntu Way
http://www.howtoforge.com/kernel_compilation_ubuntu_p2
Wednesday, January 25, 2012
AT&T assembly homework
How to write assembly under Linux.
http://asm.sourceforge.net/intro/
-- nasm
foo : no name, fill with your own name here.
GCC inline asm:
http://ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
for homework 1
http://cs.njit.edu/~sohna/cs680/hw1.html
Introduction to UNIX assembly programming
http://asm.sourceforge.net/intro/hello.html
lea (AT&T assembly)
Load-effective-address
Intel Pentium Instruction Set Reference (Basic Architecture Overview)
http://faydoc.tripod.com/cpu/
Trick:
Using lea instruction to compute certain products.
The trick is to use the scaled index addressing modes.
http://webster.cs.ucr.edu/AoA/Windows/HTML/IntegerArithmetic3.html
What is scaled index addressing modes.
Addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode
scaled addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode#Scaled
http://asm.sourceforge.net/intro/
-- nasm
foo : no name, fill with your own name here.
GCC inline asm:
http://ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
for homework 1
http://cs.njit.edu/~sohna/cs680/hw1.html
Introduction to UNIX assembly programming
http://asm.sourceforge.net/intro/hello.html
lea (AT&T assembly)
Load-effective-address
Intel Pentium Instruction Set Reference (Basic Architecture Overview)
http://faydoc.tripod.com/cpu/
Trick:
Using lea instruction to compute certain products.
The trick is to use the scaled index addressing modes.
http://webster.cs.ucr.edu/AoA/Windows/HTML/IntegerArithmetic3.html
What is scaled index addressing modes.
Addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode
scaled addressing modes:
http://en.wikipedia.org/wiki/Addressing_mode#Scaled
Subscribe to:
Posts (Atom)