title: Multiple definition of lots of function in linux kernel 2.4.32 compiling
body: <p>I am going to compile the linux kernel 2.4.32 in my x86_64 system.</p>
  
  <p><strong>make dep</strong> is ok but <strong>make bzImage</strong> stop after showing lots of link error like these:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>in the <strong>kernel2.4.32/include</strong> directory there is lots of <strong>asm</strong> directories each belonging to an specific architecture (e.g. asm-i386, asm-x86_64, asm-a64) </p>
  
  <p>and there is a single <strong>asm</strong> directory which is linked to <strong>asm-x86_64</strong> directory (because of my system architecture)</p>
  
  <p>when i remove a function with multiple definition (like set_64bit in error list) from one of these two directories <strong>asm</strong> and <strong>asm-x86_64</strong> the error will disappear.</p>
  
  <p>Is there any problem with makefile or config file? why these functions compile multiple times??!</p>
  
  <p>pleas help me...</p>