kdb
[Top] [All Lists]

Re: Kernel build problem

To: "Vladimir G. Ivanovic" <vladimir@xxxxxxx>
Subject: Re: Kernel build problem
From: Keith Owens <kaos@xxxxxxx>
Date: Wed, 01 Sep 2004 20:59:00 +1000
Cc: kdb@xxxxxxxxxxx
In-reply-to: Your message of "Tue, 31 Aug 2004 23:07:04 MST." <200409010607.i81674r4010138@xxxxxxxxxxxxxxxx>
Sender: kdb-bounce@xxxxxxxxxxx
On Tue, 31 Aug 2004 23:07:04 -0700, 
"Vladimir G. Ivanovic" <vladimir@xxxxxxx> wrote:
>I applied the KDB v4.4-2.6.9-rc1 patches to linux-2.6.8-1.533 (*), and
>now I get a strange build error:
>
>   /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S: Assembler messages:
>   /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol 
> `int80_ret_start_marker' is already defined
>   /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S:431: Error: symbol 
> `int80_ret_end_marker' is already defined
>
>Here's the compilation line that causes the error:
>
>   gcc -Wp,-MD,arch/i386/kernel/.entry.o.d -nostdinc -iwithprefix include 
> -D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.8-1.533/include 
> -D__ASSEMBLY__ -I/usr/src/linux-2.6.8-1.533/include/asm-i386/mach-default 
> -Iinclude/asm-i386/mach-default -m32 -traditional -m32  -c -o 
> arch/i386/kernel/entry.o /usr/src/linux-2.6.8-1.533/arch/i386/kernel/entry.S
>
>But, here's the rub: int80_ret_start_marker is not being redefined at
>line 431 of entry.S AFAICT. If I grep through all the sources, I find
>that int80_ret_start_marker is only referenced twice:
>
>   # find . -name "*[chS]" -exec fgrep -Hn int80_ret_end_marker {} \;
>   ./arch/i386/kernel/entry.S:140: cmpl $int80_ret_end_marker, %eax;           
>     \
>   ./arch/i386/kernel/entry.S:171:int80_ret_end_marker:                        
>             \
>and neither of them are at line 431.
>
>What gives? Would someone illuminate me?

int80_ret_end_marker is only defined once, but in a macro.  If the
macro gets used twice, you end up with a duplicate label.  Why on earth
somebody defined a macro so it can only be used once is beyond me,
macros are meant to be reusable.  Add this fix.

Index: linux-2.6.8/arch/i386/kernel/entry.S
===================================================================
--- linux-2.6.8.orig/arch/i386/kernel/entry.S   2004-09-01 17:05:09.000000000 
+1000
+++ linux-2.6.8/arch/i386/kernel/entry.S        2004-09-01 20:52:58.000000000 
+1000
@@ -294,7 +294,7 @@ ENTRY(kdb_call)
        pushl $7                # KDB_REASON_ENTRY
        call  kdb
        addl  $12,%esp          # remove args
-       RESTORE_ALL
+       jmp restore_all
 #endif
 
 /*

BTW, the grep family now supports recursive search, this is much faster.

grep -rIHn int80_ret_end_marker .

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
<Prev in Thread] Current Thread [Next in Thread>