I found bug in GNU assembler. OS is SUSE9.3 command line is: gcc -v -save-temps -Wall -W -DASM_FILE=1 -nostdinc -fno-builtin -c -o loader_img-loader.o loader.S output is: Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/specs Configured with: ./configure Thread model: posix gcc version 3.4.3 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -E -lang-asm -quiet -nostdinc -v -DASM_FILE=1 loader.S -mtune=pentiumpro -Wall -W -fno-builtin -o loader.s #include "..." search starts here: #include <...> search starts here: End of search list. as -V -Qy -o loader_img-loader.o loader.s GNU assembler version 2.15.94.0.2.2 (i586-suse-linux) using BFD version 2.15.94.0.2.2 20041220 (SuSE Linux) gcc: Internal error: Segmentation fault (program as) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. That all, that's the problem?
#define BOOT_BASE_ADDRESS 0x7C00 /* last usable byte of boot sector */ #define BOOT_SECTOR_PART_END 0x1FE /* boot sector shuold end with such byte */ #define BOOT_SECTOR_END_SIGNATURE 0xAA55 /* boot parameter block start offset */ #define BOOT_SECTOR_BPB_START 0x3 /* boot parameter block end offset */ #define BOOT_SECTOR_BPB_END 0x3E /* boot sector program version for compatibility */ #define BOOT_VERSION_MAJOR 0x0 #define BOOT_VERSION_MINOR 0x1 /* stack bottom offset */ #define BOOT_SEGMENT_STACK 0x2000 /* disk buffer for boot main part, max buffer length is 64K */ #define BOOT_BUFFER_SEGMENT 0x7000 /* maximum boot device count */ #define BOOT_DEVICE_COUNT 0x8
loader.S
Description: Binary data