1
Lowlevel-Coding / Re: Undefined reference to XXX
« am: 02. December 2012, 09:18 »
Danke!
22. November 2024, 06:17
Diese Sektion erlaubt es dir alle Beiträge dieses Mitglieds zu sehen. Beachte, dass du nur solche Beiträge sehen kannst, zu denen du auch Zugriffsrechte hast.
/*
* Copyright (C) 2012 Martin Formanek
*
* This file is part of MakeMyOS.
*
* MakeMyOS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MakeMyOS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MakeMyOS. If not, see <http://www.gnu.org/licenses/>.
*/
.section multiboot
/* contains the multiboot header */
#define MBH_MAGIC 0x1BADB002
#define MBH_FLAGS 0x3
#define MBH_CHECKSUM -(MBH_MAGIC + MBH_FLAGS)
.int MBH_MAGIC
.int MBH_FLAGS
.int MBH_CHECKSUM
.section .text
/* contains some preperations */
.global _start
.extern kmain
.extern init_ctors
_start:
cmp %eax, 0x2BADB002
jne _stop
call init_ctors
push %ebx
call kmain
_stop:
cli
hlt
jmp _stop
ld -Tkernel.ld -o bin/kernel obj/start.o obj/main.o
obj/start.o: In function `_start':
(.text+0x9): undefined reference to `init_ctors'
obj/start.o: In function `_start':
(.text+0xf): undefined reference to `kmain'
make: *** [bin/kernel] Fehler 1