Closed JazzMaster closed 6 years ago
I got it to compile by adding:
BIOS_CFLAGS += -fno-pic
to line 11 of Makefile. IDK if Position Independent Code is needed here.
What OS are you building it on?
I was building on Arch Linux with gcc 6.2.1, running the 4.7.5-1-ARCH kernel (64 bit).
Got same issue and solved using @Erroneous1 patch.
cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.10 DISTRIB_CODENAME=yakkety DISTRIB_DESCRIPTION="Ubuntu 16.10"
gcc --version gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I also would use -mno-red-zone, not to solve a compile issue but to avoid messing with the stack in case qBoot want to handle exceptions or real IRQs in the future.
Thanks, I'll apply the patch.
-mno-red-zone is not necessary because it only applies to 64-bit mode; 32-bit mode doesn't have a red zone.
I also had the same issue on "Linux ubuntu 4.12.0-rc7+ #2 SMP Thu Aug 10 05:57:30 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux". Adding BIOS_CFLAGS += -fno-pic fixed the issue.
Fixed now.
missing a table? main.o: In function
main': /home/me/Desktop/code/qboot/main.c:82: undefined reference to
_GLOBAL_OFFSETTABLE' code16.o: In functione820_query_map': /home/me/Desktop/code/qboot/code16.c:45: undefined reference to
_GLOBAL_OFFSETTABLE' printf.o: In functionprint_str': /home/me/Desktop/code/qboot/printf.c:36: undefined reference to
_GLOBAL_OFFSETTABLE' printf.o: In functionprint_int': /home/me/Desktop/code/qboot/printf.c:64: undefined reference to
_GLOBAL_OFFSETTABLE' printf.o: In functionprint_unsigned': /home/me/Desktop/code/qboot/printf.c:99: undefined reference to
_GLOBAL_OFFSETTABLE' printf.o:/home/me/Desktop/code/qboot/printf.c:141: more undefined references to `_GLOBAL_OFFSETTABLE' follow