lkml.org 
[lkml]   [1998]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.1.97: Assembler error, won't build; PATCH

(replying to Reinhold.Jordan@regio.net)

> jb> {standard input}:630: Error: operands given don't match any known 386

> set_ldt_desc(gdt+(nr<<1)+FIRST_LDT_ENTRY, ldt, ldt_size);

> in function copy_segments(). It seems to be to complex for the
> compiler. So I divide this into


> void * h;

> h=gdt+(nr<<1)+FIRST_LDT_ENTRY;
> set_ldt_desc(h, ldt, ldt_size);

I just tried

set_ldt_desc((void *)(gdt+(nr<<1)+FIRST_LDT_ENTRY),
ldt, ldt_size);

and get the same error. Strange. Perhaps a macro is breaking things?

Your fix works. Patch below:

[root@gilgamesh src]# diff -b -u linux/arch/i386/kernel/process.c-save linux/arch/i386/kernel/process.c
--- linux/arch/i386/kernel/process.c-save Tue Apr 21 01:03:31 1998
+++ linux/arch/i386/kernel/process.c Tue Apr 21 01:14:50 1998
@@ -485,10 +485,15 @@
if (new_mm->segments) {
ldt = new_mm->segments;
ldt_size = LDT_ENTRIES;
- memcpy(ldt, old_mm->segments, LDT_ENTRIES*LDT_ENTRY_SIZE);
+ memcpy(ldt, old_mm->segments,
+ LDT_ENTRIES*LDT_ENTRY_SIZE);
}
}
- set_ldt_desc(gdt+(nr<<1)+FIRST_LDT_ENTRY, ldt, ldt_size);
+
+ {
+ void *h =gdt+(nr<<1)+FIRST_LDT_ENTRY;
+ set_ldt_desc(h, ldt, ldt_size);
+ }
}


--Jim http://as220.org/jb Software Libre O Morir!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.152 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site