bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LD bug?


From: Alan Modra
Subject: Re: LD bug?
Date: Sat, 2 Feb 2002 19:29:27 +1030
User-agent: Mutt/1.3.25i

On Sat, Feb 02, 2002 at 03:15:55AM -0500, Witness wrote:
> 
> [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'

Which is correct.  Without a `%', "ds" is just the name of a symbol
(unless you have specified no register prefix via the .att_syntax
directive).  You want:

        lds     %ds:(%bx,1), %si
        mov     %es:(%di), %ax

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]