* [x86] Build error at arch/x86/boot/bioscall.S
@ 2009-06-16 7:38 Tetsuo Handa
2009-06-16 8:14 ` Amerigo Wang
2009-06-16 15:12 ` H. Peter Anvin
0 siblings, 2 replies; 10+ messages in thread
From: Tetsuo Handa @ 2009-06-16 7:38 UTC (permalink / raw)
To: hpa; +Cc: linux-kernel
Hello.
I tried to build 03347e2592078a90df818670fddf97a33eec70fb and got this error.
(...snipped...)
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
/usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
/usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/mtd/jffs2-user.h:21: userspace cannot call function or variable defined in the kernel
Documentation/accounting/getdelays.c: In function `main':
Documentation/accounting/getdelays.c:249: warning: `cmd_type' might be used uninitialized in this function
Documentation/spi/spidev_fdx.c: In function `do_msg':
Documentation/spi/spidev_fdx.c:61: warning: cast from pointer to integer of different size
Documentation/spi/spidev_fdx.c:64: warning: cast from pointer to integer of different size
arch/x86/boot/bioscall.S: Assembler messages:
arch/x86/boot/bioscall.S:68: Error: `68(%esp)' is not a valid 16 bit base/index expression
make[1]: *** [arch/x86/boot/bioscall.o] Error 1
make: *** [bzImage] Error 2
# gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Regards.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 7:38 [x86] Build error at arch/x86/boot/bioscall.S Tetsuo Handa
@ 2009-06-16 8:14 ` Amerigo Wang
2009-06-16 8:25 ` Tetsuo Handa
2009-06-16 15:15 ` H. Peter Anvin
2009-06-16 15:12 ` H. Peter Anvin
1 sibling, 2 replies; 10+ messages in thread
From: Amerigo Wang @ 2009-06-16 8:14 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: hpa, linux-kernel
On Tue, Jun 16, 2009 at 04:38:54PM +0900, Tetsuo Handa wrote:
>Hello.
>
>I tried to build 03347e2592078a90df818670fddf97a33eec70fb and got this error.
>
>(...snipped...)
>WARNING: modpost: Found 2 section mismatch(es).
>To see full details build your kernel with:
>'make CONFIG_DEBUG_SECTION_MISMATCH=y'
>/usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
>/usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/mtd/jffs2-user.h:21: userspace cannot call function or variable defined in the kernel
>Documentation/accounting/getdelays.c: In function `main':
>Documentation/accounting/getdelays.c:249: warning: `cmd_type' might be used uninitialized in this function
>Documentation/spi/spidev_fdx.c: In function `do_msg':
>Documentation/spi/spidev_fdx.c:61: warning: cast from pointer to integer of different size
>Documentation/spi/spidev_fdx.c:64: warning: cast from pointer to integer of different size
>arch/x86/boot/bioscall.S: Assembler messages:
>arch/x86/boot/bioscall.S:68: Error: `68(%esp)' is not a valid 16 bit base/index expression
Huh?
16 bit mode doesn't allow 'esp' to be used as a base/index register?
How about:
- movw 68(%esp), %di
+ movzwl %sp, %ebx
+ movw 68(%ebx), %di
? Does this work?
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 8:14 ` Amerigo Wang
@ 2009-06-16 8:25 ` Tetsuo Handa
2009-06-16 9:30 ` Amerigo Wang
2009-06-16 15:15 ` H. Peter Anvin
1 sibling, 1 reply; 10+ messages in thread
From: Tetsuo Handa @ 2009-06-16 8:25 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: hpa, linux-kernel
Amerigo Wang wrote:
> How about:
>
> - movw 68(%esp), %di
> + movzwl %sp, %ebx
> + movw 68(%ebx), %di
>
> ? Does this work?
No.
arch/x86/boot/bioscall.S: Assembler messages:
arch/x86/boot/bioscall.S:69: Error: `68(%ebx)' is not a valid 16 bit base/index expression
make[1]: *** [arch/x86/boot/bioscall.o] Error 1
make: *** [bzImage] Error 2
Regards.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 8:25 ` Tetsuo Handa
@ 2009-06-16 9:30 ` Amerigo Wang
2009-06-16 9:59 ` Michael S. Zick
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Amerigo Wang @ 2009-06-16 9:30 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: xiyou.wangcong, hpa, linux-kernel
On Tue, Jun 16, 2009 at 05:25:34PM +0900, Tetsuo Handa wrote:
>Amerigo Wang wrote:
>> How about:
>>
>> - movw 68(%esp), %di
>> + movzwl %sp, %ebx
>> + movw 68(%ebx), %di
>>
>> ? Does this work?
>No.
>
>arch/x86/boot/bioscall.S: Assembler messages:
>arch/x86/boot/bioscall.S:69: Error: `68(%ebx)' is not a valid 16 bit base/index expression
>make[1]: *** [arch/x86/boot/bioscall.o] Error 1
>make: *** [bzImage] Error 2
Ok, how about:
- movw 68(%esp), %di
+ addl $68, %esp
+ popw %di
+ subl $66, %esp
?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 9:30 ` Amerigo Wang
@ 2009-06-16 9:59 ` Michael S. Zick
2009-06-16 11:40 ` Tetsuo Handa
2009-06-16 15:15 ` H. Peter Anvin
2 siblings, 0 replies; 10+ messages in thread
From: Michael S. Zick @ 2009-06-16 9:59 UTC (permalink / raw)
To: Amerigo Wang; +Cc: Tetsuo Handa, hpa, linux-kernel
On Tue June 16 2009, Amerigo Wang wrote:
> On Tue, Jun 16, 2009 at 05:25:34PM +0900, Tetsuo Handa wrote:
> >Amerigo Wang wrote:
> >> How about:
> >>
> >> - movw 68(%esp), %di
> >> + movzwl %sp, %ebx
> >> + movw 68(%ebx), %di
> >>
> >> ? Does this work?
> >No.
> >
> >arch/x86/boot/bioscall.S: Assembler messages:
> >arch/x86/boot/bioscall.S:69: Error: `68(%ebx)' is not a valid 16 bit base/index expression
> >make[1]: *** [arch/x86/boot/bioscall.o] Error 1
> >make: *** [bzImage] Error 2
>
> Ok, how about:
>
> - movw 68(%esp), %di
> + addl $68, %esp
> + popw %di
> + subl $66, %esp
>
I do hope you have interrupts disabled around that chunk.
Just how old is the toolchain (some didn't do 16bit worth a sh..)?
Mike
> ?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 9:30 ` Amerigo Wang
2009-06-16 9:59 ` Michael S. Zick
@ 2009-06-16 11:40 ` Tetsuo Handa
2009-06-16 15:15 ` H. Peter Anvin
2 siblings, 0 replies; 10+ messages in thread
From: Tetsuo Handa @ 2009-06-16 11:40 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: hpa, linux-kernel
Amerigo Wang wrote:
> Ok, how about:
>
> - movw 68(%esp), %di
> + addl $68, %esp
> + popw %di
> + subl $66, %esp
>
> ?
Yes, that works.
Thank you.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 7:38 [x86] Build error at arch/x86/boot/bioscall.S Tetsuo Handa
2009-06-16 8:14 ` Amerigo Wang
@ 2009-06-16 15:12 ` H. Peter Anvin
1 sibling, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2009-06-16 15:12 UTC (permalink / raw)
To: Tetsuo Handa; +Cc: linux-kernel
Tetsuo Handa wrote:
> Hello.
>
> I tried to build 03347e2592078a90df818670fddf97a33eec70fb and got this error.
>
> (...snipped...)
> WARNING: modpost: Found 2 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> /usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/linux/netfilter/xt_osf.h:40: found __[us]{8,16,32,64} type without #include <linux/types.h>
> /usr/src/all/linux/kernel/git/torvalds/linux-2.6.git/usr/include/mtd/jffs2-user.h:21: userspace cannot call function or variable defined in the kernel
> Documentation/accounting/getdelays.c: In function `main':
> Documentation/accounting/getdelays.c:249: warning: `cmd_type' might be used uninitialized in this function
> Documentation/spi/spidev_fdx.c: In function `do_msg':
> Documentation/spi/spidev_fdx.c:61: warning: cast from pointer to integer of different size
> Documentation/spi/spidev_fdx.c:64: warning: cast from pointer to integer of different size
> arch/x86/boot/bioscall.S: Assembler messages:
> arch/x86/boot/bioscall.S:68: Error: `68(%esp)' is not a valid 16 bit base/index expression
> make[1]: *** [arch/x86/boot/bioscall.o] Error 1
> make: *** [bzImage] Error 2
>
> # gcc --version
> gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
What version of binutils do you have?
What you're seeing is a bug in gas.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 8:14 ` Amerigo Wang
2009-06-16 8:25 ` Tetsuo Handa
@ 2009-06-16 15:15 ` H. Peter Anvin
2009-06-16 21:43 ` Tetsuo Handa
1 sibling, 1 reply; 10+ messages in thread
From: H. Peter Anvin @ 2009-06-16 15:15 UTC (permalink / raw)
To: Amerigo Wang; +Cc: Tetsuo Handa, linux-kernel
Amerigo Wang wrote:
>
> Huh?
> 16 bit mode doesn't allow 'esp' to be used as a base/index register?
>
16-bit mode does, but gas used to be utterly broken with regards to
32-bit address overrides. This has been fixed, but apparently these
old, broken versions of gas are still out there festering in the
environment.
One possible workaround is to switch .code16 to .code16gcc at the top of
the file; another is:
- movw 68(%esp), %di
+ movw %sp, %di
+ movw 68(%di), %di
Does changing .code16 to .code16gcc work for you?
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 9:30 ` Amerigo Wang
2009-06-16 9:59 ` Michael S. Zick
2009-06-16 11:40 ` Tetsuo Handa
@ 2009-06-16 15:15 ` H. Peter Anvin
2 siblings, 0 replies; 10+ messages in thread
From: H. Peter Anvin @ 2009-06-16 15:15 UTC (permalink / raw)
To: Amerigo Wang; +Cc: Tetsuo Handa, linux-kernel
Amerigo Wang wrote:
>
> Ok, how about:
>
> - movw 68(%esp), %di
> + addl $68, %esp
> + popw %di
> + subl $66, %esp
>
This will destroy the stack if an untimely interrupt shows up.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [x86] Build error at arch/x86/boot/bioscall.S
2009-06-16 15:15 ` H. Peter Anvin
@ 2009-06-16 21:43 ` Tetsuo Handa
0 siblings, 0 replies; 10+ messages in thread
From: Tetsuo Handa @ 2009-06-16 21:43 UTC (permalink / raw)
To: hpa; +Cc: xiyou.wangcong, linux-kernel
H. Peter Anvin wrote:
> Does changing .code16 to .code16gcc work for you?
Yes, that works.
Thank you.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-06-16 21:43 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-16 7:38 [x86] Build error at arch/x86/boot/bioscall.S Tetsuo Handa
2009-06-16 8:14 ` Amerigo Wang
2009-06-16 8:25 ` Tetsuo Handa
2009-06-16 9:30 ` Amerigo Wang
2009-06-16 9:59 ` Michael S. Zick
2009-06-16 11:40 ` Tetsuo Handa
2009-06-16 15:15 ` H. Peter Anvin
2009-06-16 15:15 ` H. Peter Anvin
2009-06-16 21:43 ` Tetsuo Handa
2009-06-16 15:12 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox