Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The description of the bzImage in Wikipedia is really confusing me. alt text

The above picture is from Wikipedia, but the line next to it is:

The bzImage file is in a specific format: It contains concatenated bootsect.o + setup.o + misc.o + piggy.o.

I can't find the others (misc.o and piggy.o) in the image.
I would also like to get more clarity on these object files.

The info on this post about why we can't boot a vmlinux file is also really confusing me.

Another doubt is regarding the System.map. How is it linked to the bzImage? I know it contains the symbols of vmlinux before creating bzImage. But then at the time of booting, how does bzImage get attached to the System.map?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Till Linux 2.6.22, bzImage contained:

Linux 2.6.23 merged bbootsect and bsetup into one (header.o).

At boot up, the kernel needs to initialize some sequences (see the header file above) which are only necessary to bring the system into a desired, usable state. At runtime, those sequences are not important anymore (so why include them into the running kernel?).

System.map stands in relation with vmlinux, bzImage is just the compressed container, out of which vmlinux gets extracted at boot time (=> bzImage doesn't really care about System.map).

Linux 2.5.39 intruduced CONFIG_KALLSYMS. If enabled, the kernel keeps it's own map of symbols (/proc/kallsyms).

System.map is primary used by user space programs like klogd and ksymoops for debugging purposes.

Where to put System.map depends on the user space programs which consults it.
ksymoops tries to get the symbol map either from /proc/ksyms or /usr/src/linux/System.map.
klogd searches in /boot/System.map, /System.map and /usr/src/linux/System.map.

Removing /boot/System.map generated no problems on a Linux system with kernel 2.6.27.19 .

share|improve this answer
    
So is there any problem if i place the System.map out of boot folder? bzImage doesn't really care about System.map Does that mean both need not lie on the same directory? –  Sen Jan 13 '11 at 2:43
    
I tried to clarify the answer. –  wag Jan 14 '11 at 8:01
    
Thanks wag.. i understood it well.. –  Sen Jan 14 '11 at 8:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.