Autor Thema: LD Problem  (Gelesen 5568 mal)

clemensoft

  • Beiträge: 92
    • Profil anzeigen
    • http://www.clemensoft.de
Gespeichert
« am: 24. March 2005, 15:54 »
Hi!
Seit ich auf Linux umgestiegen bin und meinen Kernel nicht mehr mit cygwin kompiliere, streikt ld. Angeblich kann es keine Symbole finden, die vom C- ins ASM-Modul oder umgekehrt gehen.
seht selbst:

Buildscript:

cd src
cd core
nasm -f aout -o /tmp/nanocore.pef nc_main.asm

gcc -o /tmp/nanocore.cef -fwritable-strings -ffreestanding -c everything.c

ld -T link.ld -o ../../bin/nanocore.dnc /tmp/nanocore.cef /tmp/nanocore.pef
cd ..
cd ..

Output:

nasm sagt nix, gcc hat das auf win auch gesagt und es hat immer geklappt!
cc1: Anmerkung: -fwritable-strings veraltet, schauen Sie in die Dokumentation für Details
/tmp/nanocore.cef(.text+0x4c): In function `k_main':
: undefined reference to `getmemsize'
/tmp/nanocore.cef(.text+0xc7): In function `k_main':
: undefined reference to `getcpuid'
/tmp/nanocore.cef(.text+0x7fd): In function `nanocore_setup_idt':
: undefined reference to `isr_0'
/tmp/nanocore.cef(.text+0x811): In function `nanocore_setup_idt':
: undefined reference to `isr_1'
/tmp/nanocore.cef(.text+0x825): In function `nanocore_setup_idt':
: undefined reference to `isr_2'
/tmp/nanocore.cef(.text+0x839): In function `nanocore_setup_idt':
: undefined reference to `isr_3'
/tmp/nanocore.cef(.text+0x84d): In function `nanocore_setup_idt':
: undefined reference to `isr_4'
/tmp/nanocore.cef(.text+0x861): In function `nanocore_setup_idt':
: undefined reference to `isr_5'
/tmp/nanocore.cef(.text+0x875): In function `nanocore_setup_idt':
: undefined reference to `isr_6'
/tmp/nanocore.cef(.text+0x889): In function `nanocore_setup_idt':
: undefined reference to `isr_7'
/tmp/nanocore.cef(.text+0x89d): In function `nanocore_setup_idt':
: undefined reference to `isr_8'
/tmp/nanocore.cef(.text+0x8b1): In function `nanocore_setup_idt':
: undefined reference to `isr_9'
/tmp/nanocore.cef(.text+0x8c5): In function `nanocore_setup_idt':
: undefined reference to `isr_10'
/tmp/nanocore.cef(.text+0x8d9): In function `nanocore_setup_idt':
: undefined reference to `isr_11'
/tmp/nanocore.cef(.text+0x8ed): In function `nanocore_setup_idt':
: undefined reference to `isr_12'
/tmp/nanocore.cef(.text+0x901): In function `nanocore_setup_idt':
: undefined reference to `isr_13'
/tmp/nanocore.cef(.text+0x915): In function `nanocore_setup_idt':
: undefined reference to `isr_14'
/tmp/nanocore.cef(.text+0x929): In function `nanocore_setup_idt':
: undefined reference to `isr_15'
/tmp/nanocore.cef(.text+0x93d): In function `nanocore_setup_idt':
: undefined reference to `isr_16'
/tmp/nanocore.cef(.text+0x951): In function `nanocore_setup_idt':
: undefined reference to `isr_17'
/tmp/nanocore.cef(.text+0x965): In function `nanocore_setup_idt':
: undefined reference to `isr_18'
/tmp/nanocore.cef(.text+0x979): In function `nanocore_setup_idt':
: undefined reference to `isr_19'
/tmp/nanocore.cef(.text+0x98d): In function `nanocore_setup_idt':
: undefined reference to `isr_32'
/tmp/nanocore.cef(.text+0x9a1): In function `nanocore_setup_idt':
: undefined reference to `isr_33'
/tmp/nanocore.cef(.text+0x9b5): In function `nanocore_setup_idt':
: undefined reference to `isr_38'
/tmp/nanocore.cef(.text+0x9c9): In function `nanocore_setup_idt':
: undefined reference to `isr_44'
/tmp/nanocore.cef(.text+0xb6d): In function `task_init':
: undefined reference to `read_esp'
/tmp/nanocore.cef(.text+0xb7a): In function `task_init':
: undefined reference to `read_cr3'
/tmp/nanocore.cef(.text+0xc14): In function `task_add':
: undefined reference to `read_esp'
/tmp/nanocore.cef(.text+0xc22): In function `task_add':
: undefined reference to `write_esp'
/tmp/nanocore.cef(.text+0xc45): In function `task_add':
: undefined reference to `pushval'
/tmp/nanocore.cef(.text+0xc5d): In function `task_add':
: undefined reference to `read_esp'
/tmp/nanocore.cef(.text+0xe25): In function `task_store_data':
: undefined reference to `read_esp'
/tmp/nanocore.cef(.text+0xe32): In function `task_store_data':
: undefined reference to `read_cr3'
/tmp/nanocore.pef(.text+0x8):/tmp/nanocore.pef: undefined reference to `_interrupt_0'
/tmp/nanocore.pef(.text+0x1c):/tmp/nanocore.pef: undefined reference to `_interrupt_1'
/tmp/nanocore.pef(.text+0x30):/tmp/nanocore.pef: undefined reference to `_interrupt_2'
/tmp/nanocore.pef(.text+0x44):/tmp/nanocore.pef: undefined reference to `_interrupt_3'
/tmp/nanocore.pef(.text+0x58):/tmp/nanocore.pef: undefined reference to `_interrupt_4'
/tmp/nanocore.pef(.text+0x6c):/tmp/nanocore.pef: undefined reference to `_interrupt_5'
/tmp/nanocore.pef(.text+0x80):/tmp/nanocore.pef: undefined reference to `_interrupt_6'
/tmp/nanocore.pef(.text+0x94):/tmp/nanocore.pef: undefined reference to `_interrupt_7'
/tmp/nanocore.pef(.text+0xa8):/tmp/nanocore.pef: undefined reference to `_interrupt_8'
/tmp/nanocore.pef(.text+0xbc):/tmp/nanocore.pef: undefined reference to `_interrupt_9'
/tmp/nanocore.pef(.text+0xd0):/tmp/nanocore.pef: undefined reference to `_interrupt_10'
/tmp/nanocore.pef(.text+0xe4):/tmp/nanocore.pef: undefined reference to `_interrupt_11'
/tmp/nanocore.pef(.text+0xf8):/tmp/nanocore.pef: undefined reference to `_interrupt_12'
/tmp/nanocore.pef(.text+0x10c):/tmp/nanocore.pef: undefined reference to `_interrupt_13'
/tmp/nanocore.pef(.text+0x13f):/tmp/nanocore.pef: undefined reference to `_interrupt_14'
/tmp/nanocore.pef(.text+0x15b):/tmp/nanocore.pef: undefined reference to `_interrupt_15'
/tmp/nanocore.pef(.text+0x16f):/tmp/nanocore.pef: undefined reference to `_interrupt_16'
/tmp/nanocore.pef(.text+0x183):/tmp/nanocore.pef: undefined reference to `_interrupt_17'
/tmp/nanocore.pef(.text+0x197):/tmp/nanocore.pef: undefined reference to `_interrupt_18'
/tmp/nanocore.pef(.text+0x1ab):/tmp/nanocore.pef: undefined reference to `_interrupt_19'
/tmp/nanocore.pef(.text+0x1c1):/tmp/nanocore.pef: undefined reference to `_IRQ1'/tmp/nanocore.pef(.text+0x1db):/tmp/nanocore.pef: undefined reference to `_IRQ6'/tmp/nanocore.pef(.text+0x1f3):/tmp/nanocore.pef: undefined reference to `_IRQ12'
/tmp/nanocore.pef(.text+0x20f):/tmp/nanocore.pef: undefined reference to `_nanocall'
/tmp/nanocore.pef(.text+0x22e):/tmp/nanocore.pef: undefined reference to `_task_scheduler'
/tmp/nanocore.pef(.text+0x24d):/tmp/nanocore.pef: undefined reference to `_k_main'
/tmp/nanocore.pef(.text+0x25e):/tmp/nanocore.pef: undefined reference to `_printm'

clemensoft

  • Beiträge: 92
    • Profil anzeigen
    • http://www.clemensoft.de
Gespeichert
« Antwort #1 am: 25. March 2005, 20:20 »
Sind die bei jedem GCC anders? Egal, werd nachher mal meine Linux box anschmeißen

Kevin_

  • Beiträge: 52
    • Profil anzeigen
    • http://fishing-online.lite-os.de
Gespeichert
« Antwort #2 am: 26. March 2005, 02:09 »
Zitat
Sind die bei jedem GCC anders?

Nein, es gibt nur unterschiede zwischen Linux und Windows (den genauen Grund weiß ich nicht mehr aber es lag soweit ich weiß am Binärformat.)

 

Einloggen