On Mon, Mar 26, 2007 at 01:10:00AM +0900, Atsushi Nemoto wrote: > On Sun, 25 Mar 2007 03:25:52 -0400, Kumba <kumba@xxxxxxxxxx> wrote: > > Going on this, I propose the following patch to fix our lovely SGI/Cobalt > > systems, and eliminate a confusing Kconfig option whose time is likely long > > since passed. The attached patch achieves the following: > > > > * Introduces a new flag for IP22, IP32, and Cobalt called 'kernel_loads_in_ckseg0'. > > * Introduces a new header, mem-layout.h, in include/asm-mips/mach-<platform>/ > > for this flag for these three systems, and a dummy entry for mach-generic, > > calling it in where appropriate. > > * Removes CONFIG_BUILD_ELF64 from Kconfig, Makefile, and several defconfigs, and > > replaces its few references in header files with 'kernel_loads_in_ckseg0', with > > appropriate flips in logic (except in stackframe.h). > > * Includes Frank's patch to eliminate the need for -mno-explicit-relocs. > > * Moves -msym32 calling to the Makefile locations for the three machines that > > actually need it. > > I can not see why you handle IP22, IP32, Cobalt as so "special". > There are many other platforms which supports 64-bit and uses CKSEG0 > load address (well, actually all 64-bit platforms except for IP27). Note IP27 works fine either way and the code size difference is considerable: Here are numbers for ip27_defconfig with gcc 4.1.2 and binutils 2.17: text data bss dec hex filename 3397944 415768 256816 4070528 3e1c80 vmlinux BUILD_ELF64=n 3774968 415768 248624 4439360 43bd40 vmlinux BUILD_ELF64=y > So I think Franck's approach, which enables -msym32 and defines > KBUILD_64BIT_SYM32 automatically if load-y was CKSEG0, is better. Are > there any problem with his patchset? Alot more platforms could make use of this approach; the kernel size savings are considerable. The worst thing about CONFIG_BUILD_ELF64 is that it's interactivly available so making it easy for the user to choose suboptimal value or one that does not work at all, so it must become unavailable from Kconfig. Ralf