-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lesson 13: undefined reference to "_GLOBAL_OFFSET_TABLE" #16
Comments
I tried removing option |
@littlephone add |
You need to build a cross compiler from source in order to build this project. The default one in Linux won't work for you. You can see OSDev Wiki |
Do not add |
@mpetch , I tried using -fno-noPIC and -fno-PIE. I did not get any error on compiling but while linking i got this error:- ld: -f may not be used without -shared Please help! |
@motosoftos, Did you use a cross compiler or the built-in one. Most of the time when the system compiler or linker pops up error, it is preferable to build a cross compiler from source. You may refer the instructions at https://wiki.osdev.org/GCC_Cross-Compiler
…________________________________________
From: motosoftos <notifications@github.com>
Sent: Wednesday, October 9, 2019 16:28
To: cfenollosa/os-tutorial
Cc: Travor Liu; Manual
Subject: Re: [cfenollosa/os-tutorial] lesson 13: undefined reference to "_GLOBAL_OFFSET_TABLE" (#16)
@mpetch<https://github.com/mpetch> , I tried using -fno-noPIC and -fno-PIE. I did not get any error on compiling but while linking i got this error:-
ld: -f may not be used without -shared
Please help!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#16?email_source=notifications&email_token=AF5X74PK3GPKTDS3FUGLGWDQNWI35A5CNFSM4DH377O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAXCS7Y#issuecomment-539896191>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AF5X74P7OSYXFUGOHNZSDNLQNWI35ANCNFSM4DH377OQ>.
|
Sorry, i left that and came back to make it in assembly... |
Today I tried with the flags suggested by @mpetch regarding the flags The following are my commands fwiw. Please note you have to pass
Compiled and linked with my Ubuntu Mate 18.04 x86 laptop. |
when I was using ld to link kernel.o and kernel_entry.o, the error below happens
make \n kernel.o: In function ' dummy_test_entrypoint': \n kernel.c (.text+0x9): undefined reference to '_GLOBAL_OFFSET_TABLE_' \n
Any workarounds?
The text was updated successfully, but these errors were encountered: