[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LD bug?
From: |
Witness |
Subject: |
LD bug? |
Date: |
Sat, 2 Feb 2002 03:15:55 -0500 |
I've been working on an OS for a little while, and have been coming across
some assemly errors. So I just converted an Intel format program to AT&T
format so I could compile it under 'as' and link it with 'ld'. However, I
am getting a linking error from 'ld' saying that references to 'ds' and 'di'
are not found, and the only place I can find that I did not use the % sign
(as required by AT&T) were places that were legal, and are at the following:
[nboot.s:49]
ldsw ds(%bx,1), %si
[nboot.s:181]
movw %es:di, %ax
[nboot.s:190]
movw %es:di, %ax
here's the output of my makefile:
as -o nyaos nboot.s
ld -Ttext 0x0 -s --oformat binary -o nyaos.img nyaos
nyaos(.text+0x65): undefined reference to `ds'
nyaos(.text+0x137): undefined reference to `di'
nyaos(.text+0x14c): undefined reference to `di'
make: *** [make_nyaos] Error 1
The files are posted at:
http://bmeyer67.resnet.calvin.edu/Winux/NYAOS/
http://bmeyer67.resnet.calvin.edu/Winux/NYAOS/Makefile
http://bmeyer67.resnet.calvin.edu/Winux/NYAOS/nboot.s
http://bmeyer67.resnet.calvin.edu/Winux/NYAOS/nyaos.asm
Am I doing anything wrong? Or is this a bug with 'ld'?
Thanks for the help in advance,
Benjamen R. Meyer