Skip to contentSkip to conversation

binutils-2.16.90.0.3: can't compile 2.4.30

PATCH Herbert Rosmanith 1 participant 3 messages May 22, 2005 – May 23, 2005

lore
Share & tools
lore
#1 lore raw
Quoted 2 lines

it's not right to try to 32bit move a segment register anyway.

hmm ... sorry for writing without checking. it's true that as complains. but for e.g. nasm, it's no problem at all. e.g. if you consider this example:

bash-2.05# cat test.nasm

bits 32
section .text

mov eax,ds
mov ds,eax

bash-2.05# nasm -f elf test.nasm
bash-2.05# objdump -d test.o

test.o: file format elf32-i386

Disassembly of section .text:

00000000 <.text>:

   0:   8c d8                   movl   %ds,%eax
   2:   8e d8                   movl   %eax,%ds

of course, it's still not possible to move 32 bits into a segreg, so what? the processor will silently ignore the upper word, I guess. (my ix86 handbook is in the office, so I can't look it up).

so, this probably means that it's *not* the linux kernel which contains wrong code, but as from binutils-2.16 is being to restrictive when doing sanity checking, agreed?

best regards,
herbert rosmanith

#2 lore raw
Quoted 10 lines

bash-2.05# cat test.nasm

bits 32
section .text

mov eax,ds
mov ds,eax

of course, it's still not possible to move 32 bits into a segreg, so what? the processor will silently ignore the upper word, I guess.

oops ... as doesn't complain about that either .... the error is produced when moving a segreg to a 32bit memory location, e.g.:

(nasm)
mov ds,long [ebx]
(as)
#APP

        movl %ds,636(%ebx)
        movl %gs,640(%ebx)

#NO_APP

neither nasm nor as do like that. I wonder which code the previous binutils produced in that case?

sorry for the superfluos posting, I really should brush up on my assembly;-) the consequence still is to apply the patches to the kernel.

best regards,
herbert rosmanith