lib/lib.a \
-o tools/system > System.map
kernel/kernel.o: Undefined symbol ___divsi3 referenced from text
kernel/kernel.o: Undefined symbol ___divsi3 referenced from text
kernel/kernel.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: Undefined symbol ___divsi3 referenced from text
fs/fs.o: More undefined symbol ___divsi3 refs follow
floppy.o: Undefined symbol ___udivsi3 referenced from text
floppy.o: Undefined symbol ___udivsi3 referenced from text
hd.o: Undefined symbol ___udivsi3 referenced from text
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs \
-o tools/build tools/build.c
tools/build boot/bootsect boot/setup tools/system /dev/fd0 > Image
Root device is (2, 0)
Boot sector 512 bytes.
Setup is 316 bytes.
Unable to open 'system'
make: *** [Image] Error 1
和版本有关gcc-1.37.1会用到gnulib的库。
而gcc-1.40会处理好/。
比如sched.c里面有除法的操作,1.37下直接调用的gnulib里面的函数。
而1.40则转化为cpu指令。
int sys_alarm(long seconds)
{
int old = current->alarm;
if (old)
old = (old - jiffies) / HZ;
current->alarm = (seconds>0)?(jiffies+HZ*seconds):0;
return (old);
}