* 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
@ 2006-08-08 2:47 Keith Owens
2006-08-08 2:55 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: Keith Owens @ 2006-08-08 2:47 UTC (permalink / raw)
To: linux-kernel; +Cc: ak
Compiling 2.6.18-rc4 on x86_64 gets this warning.
gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-08 2:47 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o Keith Owens
@ 2006-08-08 2:55 ` Andi Kleen
2006-08-09 6:26 ` Jan Engelhardt
0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2006-08-08 2:55 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Tuesday 08 August 2006 04:47, Keith Owens wrote:
> Compiling 2.6.18-rc4 on x86_64 gets this warning.
>
> gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
> ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
>
It always gave that since some binutils update long ago.
If you know how to fix it please submit a patch, but as far as I know it's harmless.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-08 2:55 ` Andi Kleen
@ 2006-08-09 6:26 ` Jan Engelhardt
2006-08-09 7:09 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2006-08-09 6:26 UTC (permalink / raw)
To: Andi Kleen; +Cc: Keith Owens, linux-kernel
>> Compiling 2.6.18-rc4 on x86_64 gets this warning.
>>
>> gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
>> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
>> ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
>
>It always gave that since some binutils update long ago.
>If you know how to fix it please submit a patch, but as far as I know it's harmless.
Why is -m elf_i386 passed to ld?
I suppose because this is necessary because AMD64 starts in i386 16-bit
real mode?
Might try -m elf32-little or -m elf64-little.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-09 6:26 ` Jan Engelhardt
@ 2006-08-09 7:09 ` Andi Kleen
2006-08-10 7:23 ` Jan Engelhardt
0 siblings, 1 reply; 7+ messages in thread
From: Andi Kleen @ 2006-08-09 7:09 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Keith Owens, linux-kernel
On Wednesday 09 August 2006 08:26, Jan Engelhardt wrote:
> >> Compiling 2.6.18-rc4 on x86_64 gets this warning.
> >>
> >> gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
> >> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
> >> ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
> >
> >It always gave that since some binutils update long ago.
> >If you know how to fix it please submit a patch, but as far as I know it's harmless.
>
> Why is -m elf_i386 passed to ld?
> I suppose because this is necessary because AMD64 starts in i386 16-bit
> real mode?
> Might try -m elf32-little or -m elf64-little.
If you think you have a solution please submit a tested patch.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-09 7:09 ` Andi Kleen
@ 2006-08-10 7:23 ` Jan Engelhardt
2006-08-15 13:11 ` Jan Engelhardt
0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2006-08-10 7:23 UTC (permalink / raw)
To: Andi Kleen; +Cc: Keith Owens, linux-kernel
>> >> Compiling 2.6.18-rc4 on x86_64 gets this warning.
>> >>
>> >> gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
>> >> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
>> >> ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
>> >
>> >It always gave that since some binutils update long ago.
>> >If you know how to fix it please submit a patch, but as far as I know it's harmless.
>>
>If you think you have a solution please submit a tested patch.
Ok here:
Actually you have to look some lines above, namely
gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude
-include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32
-c -o arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/head.S
It specifies both -m64 and -m32 on the line. Let's see what happens:
$ file arch/x86_64/boot/compressed/head.o
arch/x86_64/boot/compressed/head.o: ELF 64-bit LSB relocatable, AMD x86-64,
version 1 (SYSV), not stripped
$ grep AFLAGS arch/x86_64/boot/compressed/Makefile
EXTRA_AFLAGS := -traditional -m32
I would have expected it to become an ELF32 object, but it is not.
Bug or feature of gcc/as?
$ gcc -v
gcc version 4.1.0 (SUSE Linux/10.1)
$ as -v
GNU assembler version 2.16.91.0.5 (x86_64-suse-linux) using BFD version
2.16.91.0.5 20051219 (SUSE Linux)
Patch below kills the warning, but I question how appropriate this is (it
feels like casting a warning in C away).. I did not test how the resulting
kernel image behaves, as I do not have any x64 that I could just reboot or
install vmware on.
diff --fast -Ndpru linux-2.6.18-rc4/arch/x86_64/boot/compressed/Makefile linux-2.6.18-rc4+/arch/x86_64/boot/compressed/Makefile
--- linux-2.6.18-rc4/arch/x86_64/boot/compressed/Makefile 2006-08-06 14:20:11.000000000 -0400
+++ linux-2.6.18-rc4+/arch/x86_64/boot/compressed/Makefile 2006-08-10 03:19:34.000000000 -0400
@@ -7,6 +7,7 @@
#
targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
+AFLAGS := $(filter-out -m64,$(AFLAGS))
EXTRA_AFLAGS := -traditional -m32
# cannot use EXTRA_CFLAGS because base CFLAGS contains -mkernel which conflicts with
#<<eof>>
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-10 7:23 ` Jan Engelhardt
@ 2006-08-15 13:11 ` Jan Engelhardt
2006-08-15 14:07 ` Andi Kleen
0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2006-08-15 13:11 UTC (permalink / raw)
To: Andi Kleen; +Cc: Keith Owens, linux-kernel
I wrote:
>>>>>Andi Kleen wrote:
>>>>> Compiling 2.6.18-rc4 on x86_64 gets this warning.
>>>>>
>>>>> gcc -Wp,-MD,arch/x86_64/boot/compressed/.head.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.0/include -D__KERNEL__ -Iinclude -Iinclude2 -I$KBUILD_OUTPUT/linux/include -include include/linux/autoconf.h -D__ASSEMBLY__ -m64 -traditional -m32 -c -o arch/x86_64/boot/compressed/head.o $KBUILD_OUTPUT/linux/arch/x86_64/boot/compressed/head.S
>>>>> ld -m elf_i386 -Ttext 0x100000 -e startup_32 -m elf_i386 arch/x86_64/boot/compressed/head.o arch/x86_64/boot/compressed/misc.o arch/x86_64/boot/compressed/piggy.o -o arch/x86_64/boot/compressed/vmlinux
>>>>> ld: warning: i386:x86-64 architecture of input file `arch/x86_64/boot/compressed/head.o' is incompatible with i386 output
[...]
>Ok here:
[...]
Any results on this, Andi?
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o
2006-08-15 13:11 ` Jan Engelhardt
@ 2006-08-15 14:07 ` Andi Kleen
0 siblings, 0 replies; 7+ messages in thread
From: Andi Kleen @ 2006-08-15 14:07 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Andi Kleen, Keith Owens, linux-kernel
>
> Any results on this, Andi?
I haven't tried, since I asked for a tested patch.
-Andi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-08-15 14:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 2:47 2.6.18-rc4 warning on arch/x86_64/boot/compressed/head.o Keith Owens
2006-08-08 2:55 ` Andi Kleen
2006-08-09 6:26 ` Jan Engelhardt
2006-08-09 7:09 ` Andi Kleen
2006-08-10 7:23 ` Jan Engelhardt
2006-08-15 13:11 ` Jan Engelhardt
2006-08-15 14:07 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox