Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm trying to compile my OS under Linux, in Windows the kernel.bin will be ~40 kb, but in Linux, it will be ~1mb! All the object files are correct, but the output of ld is huge.
This is how I link:
ld -T kernel.ld
This is my linker script:
mr. x2 wrote:
I'm trying to compile my OS under Linux, in Windows the kernel.bin will be ~40 kb, but in Linux, it will be ~1mb! All the object files are correct, but the output of ld is huge.
You probably include a huge section of zeroes. Can you post the first 10 lines of a "hexdump -C filename" of the output file?
Pype.Clicker wrote:
that suggests something wrong in your linker script that made it write 1MB of zeroes rather than setting the virtual address to 1MB ...
mr. x2 wrote:
I'm trying to compile my OS under Linux, in Windows the kernel.bin will be ~40 kb, but in Linux, it will be ~1mb! All the object files are correct, but the output of ld is huge.
You probably include a huge section of zeroes. Can you post the first 10 lines of a "hexdump -C filename" of the output file?
If I understood hexdump right, there should be alot of zeroes right at 0x00000100 to 0x000f4240...