matrix reloaded wrote:
Hi, I am going through the kbuild process and found that at some stage after building vmlinux inside "/usr/src/linux/" somewhere kbuild uses objcopy to build bzImage inside /usr/src/linux/arch/i386/boot/compressed :-From objcopy man page,
1. objcopy -O binary -R .note -R .comment /usr/src/linux/vmlinux vmlinux.bin
Here, kbuild removes .note and .comment sections from vmlinux before making vmlinux.bin. Could anyone please explain why we are creating binary image of vmlinux here. Basically, -O binary option creates a raw binary file which contains the memory dumps of the contents of the input object files. What is the purpose behind this ? objcopy with -O binary has been used in many places in kbuild process. Anyone please help me...
Thanks in advance. Sumit.
"objcopy can be used to generate a raw binary file by using an output
target of binary (e.g., use -O binary). When objcopy generates a raw
binary file, it will essentially produce a memory dump of the contents
of the input object file. All symbols and relocation information will
be discarded. The memory dump will start at the load address of the
lowest section copied into the output file."
regards
Suneesh
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/