OSDev.org
https://forum.osdev.org/

error after update linux
https://forum.osdev.org/viewtopic.php?f=1&t=20031
Page 1 of 1

Author:  Srowen [ Wed May 13, 2009 11:35 am ]
Post subject:  error after update linux

yesterday i update my linux ubuntu to the version 9.04. i tried to compile my os and the linker give me the following errors:
Code:
ld: warning: cannot find entry symbol start; defaulting to 0000000000100000
tmp/gdt.o: In function `gdt_install':
gdt.c:(.text+0x12d): undefined reference to `gdt_flush'
tmp/idt.o: In function `idt_install':
idt.c:(.text+0x1f3): undefined reference to `idt_load'
idt.c:(.text+0x20b): undefined reference to `isr0'
idt.c:(.text+0x22f): undefined reference to `isr1'
idt.c:(.text+0x253): undefined reference to `isr2'
idt.c:(.text+0x277): undefined reference to `isr3'
idt.c:(.text+0x29b): undefined reference to `isr4'
idt.c:(.text+0x2bf): undefined reference to `isr5'
idt.c:(.text+0x2e3): undefined reference to `isr6'
idt.c:(.text+0x307): undefined reference to `isr7'
idt.c:(.text+0x32b): undefined reference to `isr8'
idt.c:(.text+0x34f): undefined reference to `isr9'
idt.c:(.text+0x373): undefined reference to `isr10'
idt.c:(.text+0x397): undefined reference to `isr11'
idt.c:(.text+0x3bb): undefined reference to `isr12'
idt.c:(.text+0x3df): undefined reference to `isr13'
idt.c:(.text+0x403): undefined reference to `isr14'
idt.c:(.text+0x427): undefined reference to `isr15'
idt.c:(.text+0x44b): undefined reference to `isr16'
idt.c:(.text+0x46f): undefined reference to `isr17'
idt.c:(.text+0x493): undefined reference to `isr18'
idt.c:(.text+0x4b7): undefined reference to `isr19'
idt.c:(.text+0x4db): undefined reference to `isr20'
idt.c:(.text+0x4ff): undefined reference to `isr21'
idt.c:(.text+0x523): undefined reference to `isr22'
idt.c:(.text+0x547): undefined reference to `isr23'
idt.c:(.text+0x56b): undefined reference to `isr24'
idt.c:(.text+0x58f): undefined reference to `isr25'
idt.c:(.text+0x5b3): undefined reference to `isr26'
idt.c:(.text+0x5d7): undefined reference to `isr27'
idt.c:(.text+0x5fb): undefined reference to `isr28'
idt.c:(.text+0x61f): undefined reference to `isr29'
idt.c:(.text+0x643): undefined reference to `isr30'
idt.c:(.text+0x667): undefined reference to `isr31'
idt.c:(.text+0x690): undefined reference to `irq0'
idt.c:(.text+0x6b4): undefined reference to `irq1'
idt.c:(.text+0x6d8): undefined reference to `irq2'
idt.c:(.text+0x6fc): undefined reference to `irq3'
idt.c:(.text+0x720): undefined reference to `irq4'
idt.c:(.text+0x744): undefined reference to `irq5'
idt.c:(.text+0x768): undefined reference to `irq6'
idt.c:(.text+0x78c): undefined reference to `irq7'
idt.c:(.text+0x7b0): undefined reference to `irq8'
idt.c:(.text+0x7d4): undefined reference to `irq9'
idt.c:(.text+0x7f8): undefined reference to `irq10'
idt.c:(.text+0x81c): undefined reference to `irq11'
idt.c:(.text+0x840): undefined reference to `irq12'
idt.c:(.text+0x864): undefined reference to `irq13'
idt.c:(.text+0x888): undefined reference to `irq14'
idt.c:(.text+0x8ac): undefined reference to `irq15'
idt.c:(.text+0x8d0): undefined reference to `sys_call1'



as you can see, it can't found the function written in assembly and declared as global (in the asm file), and as extern in the .c file. I don't change nothing, it simpli start not to work. Any solution? thanks..

EDIT: of course, also the warning is the first time that came.. before i haven't got any problem..

Author:  essial [ Wed May 13, 2009 12:07 pm ]
Post subject:  Re: error after update linux

Did you clean all of the old compiled files and recompile the entire thing from scratch?

Author:  Srowen [ Wed May 13, 2009 12:31 pm ]
Post subject:  Re: error after update linux

of course.. i use an .sh file to compile and to link everything..

Author:  JohnnyTheDon [ Wed May 13, 2009 4:52 pm ]
Post subject:  Re: error after update linux

Could you please attatch that .sh file? It looks like something isn't getting linked.

Author:  AJ [ Thu May 14, 2009 8:58 am ]
Post subject:  Re: error after update linux

Hi,

In addition to the comments above, all of those undefined symbols appear to be assembly functions. Have you rebuilt your cross-toolchain and ensured that your assembler is placing files where the linker expects them?

Cheers,
Adam

Author:  Srowen [ Thu May 14, 2009 11:20 am ]
Post subject:  Re: error after update linux

i don't think that is a problem with the .sh file... otherwise i havan't change nothing... it simply start not to link.. now i'll try to recompile the gcc..

Author:  salil_bhagurkar [ Thu May 14, 2009 11:51 am ]
Post subject:  Re: error after update linux

All those functions are probably assembly functions and theres a problem with the leading underscore settings. You have declared the asm functions as '_gdt_flush'... Change it or get some setting for your compiler/assembler.

Author:  Srowen [ Thu May 14, 2009 1:20 pm ]
Post subject:  Re: error after update linux

i tried the _ first in the c file, and then in the s file. nothing...

Author:  Srowen [ Fri May 15, 2009 1:39 pm ]
Post subject:  Re: error after update linux

i have tried but nothing... i also tried to change the output format of nasm, from elf to aout, and it don't give me the linker error. Of course, i can't load the kernel because it isn't recognised...

Author:  Srowen [ Sun May 17, 2009 12:58 am ]
Post subject:  Re: error after update linux

i also tried to write [GLOBAL name_of_function] in the asm file instead of global name_of_function but the problem still the same..

Author:  JohnnyTheDon [ Sun May 17, 2009 1:25 am ]
Post subject:  Re: error after update linux

You really should let us see the .sh file you're using to build, it may be leaving out some files when linking. You also might want to try using objdump to check if the missing functions are ending up in their object files after compilation/assembly.

Author:  Srowen [ Sun May 17, 2009 2:36 am ]
Post subject:  Re: error after update linux

i translate the nasm code to the gas code and i compile with it... now it work.. and the .sh file was ok...

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/