Hello @chibicitiberiu ,
I'm your subscriber since 2021. I need your help on my Gnu GRUB(Gnu GRand Unified Bootloader) based operating system. I have some issues with undefined reference. Some error logs have collected:
/usr/local/sixtybit/lib/gcc/x86_64-elf/11.1.0/include/stddef.h:209:23: note: previous declaration of 'size_t' with type 'size_t' {aka 'long unsigned int'}
209 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
In file included from src/impl/kernel/drivers/string.c:2:
src/impl/kernel/drivers/stdint.h:18: warning: "NULL" redefined
18 | #define NULL ((void*)0)
|
In file included from src/impl/kernel/drivers/printf.h:37,
from src/impl/kernel/drivers/types.h:25,
from src/impl/kernel/drivers/string.h:4,
from src/impl/kernel/drivers/string.c:1:
/usr/local/sixtybit/lib/gcc/x86_64-elf/11.1.0/include/stddef.h:395: note: this is the location of the previous definition
395 | #define NULL ((void *)0)
|
src/impl/kernel/drivers/string.c: In function 'memcmp':
src/impl/kernel/drivers/string.c:83:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
83 | unsigned char *x = strng1;
| ^~~~~~
src/impl/kernel/drivers/string.c:84:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
84 | unsigned char *y = strng2;
| ^~~~~~
make: *** [Makefile:23: build/kernel/drivers/string.o] Error 1
afif@DESKTOP-VM3GA2V:/mnt/c/Users/AFIF/OneDrive/Documents/OS/Orzen-bird/mainboy/osdev-guide/testing$ make
mkdir -p build/kernel/drivers/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/drivers/string.c -o build/kernel/drivers/string.o
src/impl/kernel/drivers/string.c: In function 'memcmp':
src/impl/kernel/drivers/string.c:83:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
83 | unsigned char *x = strng1;
| ^~~~~~
src/impl/kernel/drivers/string.c:84:20: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
84 | unsigned char *y = strng2;
| ^~~~~~
mkdir -p build/kernel/drivers/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/drivers/tty.c -o build/kernel/drivers/tty.o
mkdir -p build/kernel/drivers/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/drivers/vga.c -o build/kernel/drivers/vga.o
mkdir -p build/kernel/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/main.c -o build/kernel/main.o
mkdir -p build/kernel/maintools/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/maintools/print.c -o build/kernel/maintools/print.o
mkdir -p build/kernel/maintools/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/maintools/stdio.c -o build/kernel/maintools/stdio.o
mkdir -p build/kernel/maintools/
x86_64-elf-gcc -c -ffreestanding src/impl/kernel/maintools/x86.c -o build/kernel/maintools/x86.o
mkdir -p build/x86_64/boot/
nasm -f elf64 src/impl/x86_64/boot/header.asm -o build/x86_64/boot/header.o
mkdir -p build/x86_64/boot/
nasm -f elf64 src/impl/x86_64/boot/main.asm -o build/x86_64/boot/main.o
mkdir -p build/x86_64/boot/
nasm -f elf64 src/impl/x86_64/boot/main64.asm -o build/x86_64/boot/main64.o
mkdir -p dist/x86_64
x86_64-elf-ld -n -o dist/x86_64/kernel.bin -T targets/x86_64/linker.ld build/kernel/drivers/asm_ports.o build/kernel/drivers/ata.o build/kernel/drivers/disk.o build/kernel/drivers/fat32.o build/kernel/drivers/kb.o build/kernel/drivers/printf.o build/kernel/drivers/string.o build/kernel/drivers/tty.o build/kernel/drivers/vga.o build/kernel/main.o build/kernel/maintools/print.o build/kernel/maintools/stdio.o build/kernel/maintools/x86.o build/kernel/maintools/print.o build/kernel/maintools/stdio.o build/kernel/maintools/x86.o build/x86_64/boot/header.o build/x86_64/boot/main.o build/x86_64/boot/main64.o build/kernel/drivers/asm_ports.o build/kernel/drivers/ata.o build/kernel/drivers/disk.o build/kernel/drivers/fat32.o build/kernel/drivers/kb.o build/kernel/drivers/printf.o build/kernel/drivers/string.o build/kernel/drivers/tty.o build/kernel/drivers/vga.o
x86_64-elf-ld: build/kernel/drivers/kb.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined
here
x86_64-elf-ld: build/kernel/drivers/vga.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/main.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/main.o:(.bss+0x20): multiple definition of `fat'; build/kernel/drivers/fat32.o:(.bss+0x20): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o:(.data+0x8): multiple definition of `color'; build/kernel/drivers/tty.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o:(.data+0x0): multiple definition of `buffer'; build/kernel/maintools/print.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o:(.bss+0x0): multiple definition of `col'; build/kernel/maintools/print.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o:(.bss+0x8): multiple definition of `row'; build/kernel/maintools/print.o:(.bss+0x8): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o:(.data+0x8): multiple definition of `color'; build/kernel/drivers/tty.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `clear_row':
print.c:(.text+0x0): multiple definition of `clear_row'; build/kernel/maintools/print.o:print.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `print_clear':
print.c:(.text+0x5c): multiple definition of `print_clear'; build/kernel/maintools/print.o:print.c:(.text+0x5c): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `print_newline':
print.c:(.text+0x8e): multiple definition of `print_newline'; build/kernel/maintools/print.o:print.c:(.text+0x8e): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `print_char':
print.c:(.text+0x168): multiple definition of `print_char'; build/kernel/maintools/print.o:print.c:(.text+0x168): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `print_str':
print.c:(.text+0x1ed): multiple definition of `print_str'; build/kernel/maintools/print.o:print.c:(.text+0x1ed): first defined here
x86_64-elf-ld: build/kernel/maintools/print.o: in function `print_set_color':
print.c:(.text+0x22d): multiple definition of `print_set_color'; build/kernel/maintools/print.o:print.c:(.text+0x22d): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.rodata+0x0): multiple definition of `SCREEN_WIDTH'; build/kernel/maintools/stdio.o:(.rodata+0x0):
first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.rodata+0x4): multiple definition of `SCREEN_HEIGHT'; build/kernel/maintools/stdio.o:(.rodata+0x4): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.rodata+0x8): multiple definition of `DEFAULT_COLOR'; build/kernel/maintools/stdio.o:(.rodata+0x8): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.data+0x0): multiple definition of `g_ScreenBuffer'; build/kernel/maintools/stdio.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.bss+0x0): multiple definition of `g_ScreenX'; build/kernel/maintools/stdio.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.bss+0x4): multiple definition of `g_ScreenY'; build/kernel/maintools/stdio.o:(.bss+0x4): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `putchr':
stdio.c:(.text+0x0): multiple definition of `putchr'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `putcolor':
stdio.c:(.text+0x36): multiple definition of `putcolor'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x36): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `getchr':
stdio.c:(.text+0x6f): multiple definition of `getchr'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x6f): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `getcolor':
stdio.c:(.text+0x9c): multiple definition of `getcolor'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x9c): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `setcursor':
stdio.c:(.text+0xcc): multiple definition of `setcursor'; build/kernel/maintools/stdio.o:stdio.c:(.text+0xcc): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `clrscr':
stdio.c:(.text+0x135): multiple definition of `clrscr'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x135): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `scrollback':
stdio.c:(.text+0x1c6): multiple definition of `scrollback'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x1c6): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `putc':
stdio.c:(.text+0x2c3): multiple definition of `putc'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x2c3): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `puts':
stdio.c:(.text+0x3cd): multiple definition of `puts'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x3cd): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o:(.rodata+0x10): multiple definition of `g_HexChars'; build/kernel/maintools/stdio.o:(.rodata+0x10):
first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `printf_unsigned':
stdio.c:(.text+0x400): multiple definition of `printf_unsigned'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x400): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `printf_signed':
stdio.c:(.text+0x48a): multiple definition of `printf_signed'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x48a): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `printf':
stdio.c:(.text+0x4d7): multiple definition of `printf'; build/kernel/maintools/stdio.o:stdio.c:(.text+0x4d7): first defined here
x86_64-elf-ld: build/kernel/maintools/stdio.o: in function `print_buffer':
stdio.c:(.text+0xac4): multiple definition of `print_buffer'; build/kernel/maintools/stdio.o:stdio.c:(.text+0xac4): first defined here
x86_64-elf-ld: build/kernel/maintools/x86.o: in function `x86_outb':
x86.c:(.text+0x0): multiple definition of `x86_outb'; build/kernel/maintools/x86.o:x86.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/maintools/x86.o: in function `x86_inb':
x86.c:(.text+0x1d): multiple definition of `x86_inb'; build/kernel/maintools/x86.o:x86.c:(.text+0x1d): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_byte_in':
asm_ports.c:(.text+0x0): multiple definition of `port_byte_in'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_byte_out':
asm_ports.c:(.text+0x1a): multiple definition of `port_byte_out'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x1a): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_word_in':
asm_ports.c:(.text+0x37): multiple definition of `port_word_in'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x37): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_word_out':
asm_ports.c:(.text+0x53): multiple definition of `port_word_out'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x53): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_long_out':
asm_ports.c:(.text+0x70): multiple definition of `port_long_out'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x70): first defined here
x86_64-elf-ld: build/kernel/drivers/asm_ports.o: in function `port_long_in':
asm_ports.c:(.text+0x84): multiple definition of `port_long_in'; build/kernel/drivers/asm_ports.o:asm_ports.c:(.text+0x84): first defined here
x86_64-elf-ld: build/kernel/drivers/ata.o: in function `read_sectors_ATA_PIO':
ata.c:(.text+0x0): multiple definition of `read_sectors_ATA_PIO'; build/kernel/drivers/ata.o:ata.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/ata.o: in function `write_sectors_ATA_PIO':
ata.c:(.text+0x109): multiple definition of `write_sectors_ATA_PIO'; build/kernel/drivers/ata.o:ata.c:(.text+0x109): first defined here
x86_64-elf-ld: build/kernel/drivers/disk.o: in function `getDiskBytes':
disk.c:(.text+0x0): multiple definition of `getDiskBytes'; build/kernel/drivers/disk.o:disk.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o:(.bss+0x20): multiple definition of `fat'; build/kernel/drivers/fat32.o:(.bss+0x20): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `initiateFat32':
fat32.c:(.text+0x0): multiple definition of `initiateFat32'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `highLowCombiner':
fat32.c:(.text+0x344): multiple definition of `highLowCombiner'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x344): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `getFatEntry':
fat32.c:(.text+0x3a5): multiple definition of `getFatEntry'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x3a5): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `compFilename':
fat32.c:(.text+0x453): multiple definition of `compFilename'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x453): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `followConventionalDirectoryLoop':
fat32.c:(.text+0x485): multiple definition of `followConventionalDirectoryLoop'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x485): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `formatToShort8_3Format':
fat32.c:(.text+0x5b5): multiple definition of `formatToShort8_3Format'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x5b5): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showCluster':
fat32.c:(.text+0x70e): multiple definition of `showCluster'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x70e): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showFileByCluster':
fat32.c:(.text+0x923): multiple definition of `showFileByCluster'; build/kernel/drivers/fat32.o:fat32.c:(.text+0x923): first defined here
x86_64-elf-ld: build/kernel/drivers/kb.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined
here
x86_64-elf-ld: build/kernel/drivers/kb.o:(.data+0x0): multiple definition of `characterTable'; build/kernel/drivers/kb.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/kb.o:(.data+0xa0): multiple definition of `shiftedCharacterTable'; build/kernel/drivers/kb.o:(.data+0xa0): first defined here
x86_64-elf-ld: build/kernel/drivers/kb.o: in function `readStr':
kb.c:(.text+0x0): multiple definition of `readStr'; build/kernel/drivers/kb.o:kb.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `_putchar':
printf.c:(.text+0x0): multiple definition of `_putchar'; build/kernel/drivers/printf.o:printf.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `printf_':
printf.c:(.text+0x1fa4): multiple definition of `printf_'; build/kernel/drivers/printf.o:printf.c:(.text+0x1fa4): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `sprintf_':
printf.c:(.text+0x2067): multiple definition of `sprintf_'; build/kernel/drivers/printf.o:printf.c:(.text+0x2067): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `snprintf_':
printf.c:(.text+0x212a): multiple definition of `snprintf_'; build/kernel/drivers/printf.o:printf.c:(.text+0x212a): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `vprintf_':
printf.c:(.text+0x21ea): multiple definition of `vprintf_'; build/kernel/drivers/printf.o:printf.c:(.text+0x21ea): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `vsnprintf_':
printf.c:(.text+0x2222): multiple definition of `vsnprintf_'; build/kernel/drivers/printf.o:printf.c:(.text+0x2222): first defined here
x86_64-elf-ld: build/kernel/drivers/printf.o: in function `fctprintf':
printf.c:(.text+0x225c): multiple definition of `fctprintf'; build/kernel/drivers/printf.o:printf.c:(.text+0x225c): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `strchr':
string.c:(.text+0x0): multiple definition of `strchr'; build/kernel/drivers/string.o:string.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `strcpy':
string.c:(.text+0x44): multiple definition of `strcpy'; build/kernel/drivers/string.o:string.c:(.text+0x44): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `strlen':
string.c:(.text+0xa9): multiple definition of `strlen'; build/kernel/drivers/string.o:string.c:(.text+0xa9): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `memcpy':
string.c:(.text+0xd3): multiple definition of `memcpy'; build/kernel/drivers/string.o:string.c:(.text+0xd3): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `memset':
string.c:(.text+0x12e): multiple definition of `memset'; build/kernel/drivers/string.o:string.c:(.text+0x12e): first defined here
x86_64-elf-ld: build/kernel/drivers/string.o: in function `memcmp':
string.c:(.text+0x16d): multiple definition of `memcmp'; build/kernel/drivers/string.o:string.c:(.text+0x16d): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o:(.bss+0x0): multiple definition of `cursorX'; build/kernel/drivers/tty.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o:(.bss+0x4): multiple definition of `cursorY'; build/kernel/drivers/tty.o:(.bss+0x4): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o:(.rodata+0x0): multiple definition of `sw'; build/kernel/drivers/tty.o:(.rodata+0x0): first defined herex86_64-elf-ld: build/kernel/drivers/tty.o:(.rodata+0x1): multiple definition of `sh'; build/kernel/drivers/tty.o:(.rodata+0x1): first defined herex86_64-elf-ld: build/kernel/drivers/tty.o:(.rodata+0x2): multiple definition of `sd'; build/kernel/drivers/tty.o:(.rodata+0x2): first defined herex86_64-elf-ld: build/kernel/drivers/tty.o:(.data+0x0): multiple definition of `color'; build/kernel/drivers/tty.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o:(.bss+0x8): multiple definition of `toQEMU'; build/kernel/drivers/tty.o:(.bss+0x8): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `clearLine':
tty.c:(.text+0x0): multiple definition of `clearLine'; build/kernel/drivers/tty.o:tty.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `updateCursor':
tty.c:(.text+0xa1): multiple definition of `updateCursor'; build/kernel/drivers/tty.o:tty.c:(.text+0xa1): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `clearScreen':
tty.c:(.text+0x10d): multiple definition of `clearScreen'; build/kernel/drivers/tty.o:tty.c:(.text+0x10d): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `scrollUp':
tty.c:(.text+0x149): multiple definition of `scrollUp'; build/kernel/drivers/tty.o:tty.c:(.text+0x149): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `newLineCheck':
tty.c:(.text+0x23f): multiple definition of `newLineCheck'; build/kernel/drivers/tty.o:tty.c:(.text+0x23f): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `printfch':
tty.c:(.text+0x265): multiple definition of `printfch'; build/kernel/drivers/tty.o:tty.c:(.text+0x265): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `set_screen_color':
tty.c:(.text+0x3de): multiple definition of `set_screen_color'; build/kernel/drivers/tty.o:tty.c:(.text+0x3de): first defined here
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `set_screen_color_from_color_code':
tty.c:(.text+0x3fa): multiple definition of `set_screen_color_from_color_code'; build/kernel/drivers/tty.o:tty.c:(.text+0x3fa): first defined herex86_64-elf-ld: build/kernel/drivers/tty.o: in function `printf_colored':
tty.c:(.text+0x40d): multiple definition of `printf_colored'; build/kernel/drivers/tty.o:tty.c:(.text+0x40d): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o:(.bss+0x0): multiple definition of `GRUB_PACKED'; build/kernel/drivers/fat32.o:(.bss+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o:(.bss+0x20): multiple definition of `width'; build/kernel/drivers/vga.o:(.bss+0x20): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o:(.bss+0x24): multiple definition of `height'; build/kernel/drivers/vga.o:(.bss+0x24): first defined herex86_64-elf-ld: build/kernel/drivers/vga.o:(.bss+0x28): multiple definition of `textcolor'; build/kernel/drivers/vga.o:(.bss+0x28): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o:(.data+0x0): multiple definition of `bg_color'; build/kernel/drivers/vga.o:(.data+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `drawRect':
vga.c:(.text+0x0): multiple definition of `drawRect'; build/kernel/drivers/vga.o:vga.c:(.text+0x0): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `changeTextColor':
vga.c:(.text+0xec): multiple definition of `changeTextColor'; build/kernel/drivers/vga.o:vga.c:(.text+0xec): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `changeBg':
vga.c:(.text+0x117): multiple definition of `changeBg'; build/kernel/drivers/vga.o:vga.c:(.text+0x117): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `drawText':
vga.c:(.text+0x142): multiple definition of `drawText'; build/kernel/drivers/vga.o:vga.c:(.text+0x142): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `drawPixel':
vga.c:(.text+0x401): multiple definition of `drawPixel'; build/kernel/drivers/vga.o:vga.c:(.text+0x401): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `drawLine':
vga.c:(.text+0x48a): multiple definition of `drawLine'; build/kernel/drivers/vga.o:vga.c:(.text+0x48a): first defined here
x86_64-elf-ld: build/kernel/drivers/vga.o: in function `changeColor':
vga.c:(.text+0x5d6): multiple definition of `changeColor'; build/kernel/drivers/vga.o:vga.c:(.text+0x5d6): first defined here
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `getFatEntry':
fat32.c:(.text+0x3e5): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x44a): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `followConventionalDirectoryLoop':
fat32.c:(.text+0x4ae): undefined reference to `strlength'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `formatToShort8_3Format':
fat32.c:(.text+0x5ef): undefined reference to `strlength'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showCluster':
fat32.c:(.text+0x74e): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x916): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showFileByCluster':
fat32.c:(.text+0x94d): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x9ce): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/kb.o: in function `readStr':
kb.c:(.text+0x2d): undefined reference to `inportb'
x86_64-elf-ld: kb.c:(.text+0x45): undefined reference to `inportb'
x86_64-elf-ld: build/kernel/drivers/tty.o: in function `updateCursor':
tty.c:(.text+0xd0): undefined reference to `outportb'
x86_64-elf-ld: tty.c:(.text+0xe5): undefined reference to `outportb'
x86_64-elf-ld: tty.c:(.text+0xf4): undefined reference to `outportb'
x86_64-elf-ld: tty.c:(.text+0x106): undefined reference to `outportb'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `getFatEntry':
fat32.c:(.text+0x3e5): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x44a): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `followConventionalDirectoryLoop':
fat32.c:(.text+0x4ae): undefined reference to `strlength'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `formatToShort8_3Format':
fat32.c:(.text+0x5ef): undefined reference to `strlength'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showCluster':
fat32.c:(.text+0x74e): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x916): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/fat32.o: in function `showFileByCluster':
fat32.c:(.text+0x94d): undefined reference to `malloc'
x86_64-elf-ld: fat32.c:(.text+0x9ce): undefined reference to `free'
x86_64-elf-ld: build/kernel/drivers/kb.o: in function `readStr':// these were the logs I was able to collect
Hello @chibicitiberiu , I'm your subscriber since 2021. I need your help on my Gnu GRUB(Gnu GRand Unified Bootloader) based operating system. I have some issues with undefined reference. Some error logs have collected:
And one thing , to make an initrd image , run
[Uploading src.zip…]()