error after update linux

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

error after update linux

Post by Srowen »

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: Select all

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..
essial
Member
Member
Posts: 26
Joined: Sat Mar 01, 2008 10:23 pm

Re: error after update linux

Post by essial »

Did you clean all of the old compiled files and recompile the entire thing from scratch?
Srowen
Member
Member
Posts: 60
Joined: Thu Feb 26, 2009 2:31 pm
Location: Genova, ITALY

Re: error after update linux

Post by Srowen »

of course.. i use an .sh file to compile and to link everything..
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: error after update linux

Post by JohnnyTheDon »

Could you please attatch that .sh file? It looks like something isn't getting linked.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: error after update linux

Post by AJ »

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

Re: error after update linux

Post by Srowen »

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

Re: error after update linux

Post by salil_bhagurkar »

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

Re: error after update linux

Post by Srowen »

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

Re: error after update linux

Post by Srowen »

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

Re: error after update linux

Post by Srowen »

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

Re: error after update linux

Post by JohnnyTheDon »

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

Re: error after update linux

Post by Srowen »

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