I am going to compile the linux kernel 2.4.32 in my x86_64 system.
make dep is ok but make bzImage stop after showing lots of link error like these:
ld -m elf_x86_64 -e stext -r -o kernel.o sched.o dma.o fork.o exec_domain.o panic.o printk.o module.o exit.o itimer.o info.o time.o softirq.o resource.o sysctl.o acct.o capability.o ptrace.o timer.o user.o signal.o sys.o kmod.o context.o ksyms.o pm.o
dma.o: In function `set_64bit':
dma.c:(.text+0x0): multiple definition of `set_64bit'
sched.o:sched.c:(.text+0x1b): first defined here
dma.o: In function `get_order':
dma.c:(.text+0x4): multiple definition of `get_order'
sched.o:sched.c:(.text+0x0): first defined here
dma.o: In function `read_lock':
dma.c:(.text+0x1a): multiple definition of `read_lock'
sched.o:sched.c:(.text+0x9c): first defined here
dma.o: In function `cpuid':
dma.c:(.text+0xc9): multiple definition of `cpuid'
sched.o:sched.c:(.text+0x24): first defined here
dma.o: In function `cpuid_eax':
dma.c:(.text+0xe1): multiple definition of `cpuid_eax'
sched.o:sched.c:(.text+0x41): first defined here
dma.o: In function `cpuid_ebx':
dma.c:(.text+0xe8): multiple definition of `cpuid_ebx'
sched.o:sched.c:(.text+0x4d): first defined here
dma.o: In function `cpuid_ecx':
dma.c:(.text+0xf1): multiple definition of `cpuid_ecx'
sched.o:sched.c:(.text+0x5b): first defined here
dma.o: In function `cpuid_edx':
dma.c:(.text+0xfa): multiple definition of `cpuid_edx'
sched.o:sched.c:(.text+0x69): first defined here
dma.o: In function `thread_saved_pc':
dma.c:(.text+0x103): multiple definition of `thread_saved_pc'
sched.o:sched.c:(.text+0x77): first defined here
dma.o: In function `rep_nop':
dma.c:(.text+0x10c): multiple definition of `rep_nop'
sched.o:sched.c:(.text+0x85): first defined here
dma.o: In function `sync_core':
dma.c:(.text+0x10f): multiple definition of `sync_core'
sched.o:sched.c:(.text+0x8d): first defined here
in the kernel2.4.32/include directory there is lots of asm directories each belonging to an specific architecture (e.g. asm-i386, asm-x86_64, asm-a64)
and there is a single asm directory which is linked to asm-x86_64 directory (because of my system architecture)
when i remove a function with multiple definition (like set_64bit in error list) from one of these two directories asm and asm-x86_64 the error will disappear.
Is there any problem with makefile or config file? why these functions compile multiple times??!
pleas help me...
extern inline
instead of commonstatic inline
definition in the header. – Tsyvarevstatic inline
– N. S.inb, inw, inl, outb, outw, outl, insb
...) I can't find these function definition! There is no pure function for these names! Although i have changed some similar functions tostatic inline
. But the problem with these function is still left!! – N. S.