2.6.20-rc6-mm1: linker error with arch_setup_additional_pages
Quoted 3 lines
CONFIG_BINFMT_ELF=y
#CONFIG_BINFMT_MISCis not set
#CONFIG_IA32_EMULATIONis not set
Hm Ok. That's explainable. You don't have CONFIG_IA32_EMULATION set and arch_setup_additional pages is only defined/exported in syscall32.c which won't be built in your case. (It should go away if you set CONFIG_IA32_EMULATION).
Andi - Is arch_setup_additional_pages required for x86_64 without IA32? If so what should it call (like it calls syscall32_setup_pages in IA32 case)? If it is not needed I guess we can make it a no-op in case IA32_EMULATION=n?
linux/interp.h -
#ifdef CONFIG_X86_64 && !defined CONFIG_IA32_EMULATION static inline int arch_setup_additional_pages(struct linux_binprm *bprm,
int executable_stack)
{
return 0;
}Perhaps we need an arch-specific override for interp.h?
Parag
Quoted 9 lines · Parag Warudkar
Quoted 3 lines
CONFIG_BINFMT_ELF=y
#CONFIG_BINFMT_MISCis not set
#CONFIG_IA32_EMULATIONis not setHm Ok. That's explainable. You don't have
CONFIG_IA32_EMULATIONset andarch_setup_additionalpages is only defined/exported insyscall32.cwhich won't be built in your case. (It should go away if you setCONFIG_IA32_EMULATION).
I think the easy and correct fix for this situation is defining CONFIG_ARCH_HAS_SETUP_ADDITIONAL_PAGES on x86_64 only if IA32_EMULATION is defined. (Because x86_64 proper doesn't seem to require arch_setup_additional_pages() only IA32 emulation requires it.)
The patch below should fix it. (Please use attachment - less chance of whitespace issues. Sorry no control over mail client atm)
--- linux-2.6.20-rc6-mm1/arch/x86_64/Kconfig.orig 2007-01-28
17:32:09.000000000 -0500
+++ linux-2.6.20-rc6-mm1/arch/x86_64/Kconfig 2007-01-28 17:32:48.000000000 -0500
@@ -405,7 +405,7 @@
config ARCH_HAS_SETUP_ADDITIONAL_PAGES
bool
default y
- depends on X86_64
+ depends on X86_64 && IA32_EMULATION
config OUT_OF_LINE_PFN_TO_PAGE
def_bool y
arch/x86_64/Kconfig renamed from arch/x86_64/Kconfig.orig +1 -1
@@ -405,7 +405,7 @@ config ARCH_HAS_SETUP_ADDITIONAL_PAGES bool default y - depends on X86_64 + depends on X86_64 && IA32_EMULATION config OUT_OF_LINE_PFN_TO_PAGE def_bool y
Quoted 9 lines
I think the easy and correct fix for this situation is defining
CONFIG_ARCH_HAS_SETUP_ADDITIONAL_PAGESonx86_64only ifIA32_EMULATIONis defined. (Becausex86_64proper doesn't seem to requirearch_setup_additional_pages()only IA32 emulation requires it.)The patch below should fix it. (Please use attachment - less chance of whitespace issues. Sorry no control over mail client atm)
A more elegant solution would be to do away with the CONFIG and switch to a weak function in the caller.
-Andi
Quoted 7 lines · On Mon, 29 Jan 2007 03:51:54 +0100 Andi Kleen <[email protected]> wrote:
Quoted 7 lines
I think the easy and correct fix for this situation is defining
CONFIG_ARCH_HAS_SETUP_ADDITIONAL_PAGESonx86_64only ifIA32_EMULATIONis defined. (Becausex86_64proper doesn't seem to requirearch_setup_additional_pages()only IA32 emulation requires it.)
Quoted 6 lines
Quoted 2 lines
The patch below should fix it. (Please use attachment - less chance of whitespace issues. Sorry no control over mail client atm)
A more elegant solution would be to do away with the CONFIG and switch to a weak function in the caller.
Now why didn't I think of that?