ELF gcc compiling problems

1. Problem: Compiling kernel w/ gcc-elf

Hello guys,

Have anyone sucessfully compiled the kernel using gcc-elf?  I could get
the object files without any problem.  However, when ld tried to link up
the objects to build vmlinux, it failed.  The errors are :

arch/i386/mm/mm.o(.text+0x5ba): undefined reference to `pg0'
arch/i386/mm/mm.o(.text+0x604): undefined reference to `pg0'
kernel/kernel.o(.text+0x19e): undefined reference to `_current'
kernel/kernel.o(.text+0x1ab): undefined reference to `_last_task_used_math'
kernel/kernel.o(.data+0x39c): undefined reference to `sys_call_table'
kernel/kernel.o(.data+0x424): undefined reference to `floppy_track_buffer'
kernel/kernel.o(.data+0x2aac): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x7c): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x2a0): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x2c6): undefined reference to `swapper_pg_dir'
fs/fs.o(.text+0xdfd6): undefined reference to `sys_call_table'
fs/fs.o(.text+0xe956): undefined reference to `sys_call_table'

I have gone thru the .s files produced and found that it was due to the
number of underscore generated by the assembler in front of .data and
.text symbols.  

Does anyone have idea for this problem?

Best Regards.

William LaiA

2. Trouble porting berkeley lpd suite

3. gcc - ELF problem compiling kernel.

4. ** Floppy activity INTERRUPTS EVERYTHING **

5. problems compiling modules1.2.8 with Elf-gcc

6. how best to read one line of text from ttyS0

7. GCC 2.7.2 , XFree86 , ELF not compiling shared ?

8. some sites unreachable with DSL

9. can gcc 2.6.3 compile NON-ELF kernel?

10. gcc compiled, but won't execute with ELF.

11. error compiling kernel after upgraded to gcc 2.7.0 and elf lib 5.0.9

12. Compiling gawk-2.15.6 with ELF-gcc

13. gcc 2.7.x compile time for a.out and ELF