📄 readme.build-process
字号:
During memory testing memtest86 relocates itself in memory so it can test thememory it was previously running from. memtest86 is compiled as position mostlyindependent code. Some relocations records must be processed to achieve theaffect of position independent code. A 16 bit loader is prepended to memtest86so it can be loaded from a floppy, or from lilo.In restructuring the build process I had several goals. Maintainability andcomprehsibility of the build process. Simplicity of the toolset. And theability to build images bootable by both the legacy x86 bootloader,and images bootable by bootloaders that directly load static ELF images. With the ability to proecess relocation records, memtest.bin has beenreduced in size from 84480 bytes to 49308 bytes. And now only requires one copyof memtest86. A reduction in size of 35K. And the build process can now ignorethe size of memtest86.BIOS calls have been moved from setup.S to head.S making bootsect.S andsetup.S exclusively for booting.memtest86 is built in three stages. In the first stage the relocatable objectfiles are built as with any program. In the second stage the relocatable objectfiles are linked together into memtest_shared, a shared library versionof memtest86. In the third stage a raw memory image of memtest_shared is formedand linked into memtest.bin, and memtest.memtest.bin is the floppy/lilo bootable target.memtest is the ELF bootable target.Another major change is now data in the bss segment is also preservedwhen memtest86 is relocated, and memtest86 can be relocated to any address. The one thing to watch out for is pointers to data inside of memtest86. Exceptfor constant pointers to static data there is not enough information to generaterelocation records for pointers so they will not change when memtest86 isrelocated, which might lead to nasty surpises.Eric Biederman <ebiederman@lnxi.com>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -