OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Nov 23, 2017 10:04 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: error after update linux
PostPosted: Wed May 13, 2009 11:35 am 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
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..


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Wed May 13, 2009 12:07 pm 
Offline
Member
Member

Joined: Sat Mar 01, 2008 10:23 pm
Posts: 26
Did you clean all of the old compiled files and recompile the entire thing from scratch?


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Wed May 13, 2009 12:31 pm 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
of course.. i use an .sh file to compile and to link everything..


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Wed May 13, 2009 4:52 pm 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
Could you please attatch that .sh file? It looks like something isn't getting linked.


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Thu May 14, 2009 8:58 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2559
Location: Devon, UK
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


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Thu May 14, 2009 11:20 am 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
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..


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Thu May 14, 2009 11:51 am 
Offline
Member
Member
User avatar

Joined: Mon Feb 19, 2007 10:40 am
Posts: 261
Location: India
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.


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Thu May 14, 2009 1:20 pm 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
i tried the _ first in the c file, and then in the s file. nothing...


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Fri May 15, 2009 1:39 pm 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
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...


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Sun May 17, 2009 12:58 am 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
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..


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Sun May 17, 2009 1:25 am 
Offline
Member
Member

Joined: Sun Nov 09, 2008 2:55 am
Posts: 524
Location: Pennsylvania, USA
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.


Top
 Profile  
 
 Post subject: Re: error after update linux
PostPosted: Sun May 17, 2009 2:36 am 
Offline
Member
Member

Joined: Thu Feb 26, 2009 2:31 pm
Posts: 60
Location: Genova, ITALY
i translate the nasm code to the gas code and i compile with it... now it work.. and the .sh file was ok...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group