Meaty Skeleton undefined reference to _init
Posted: Tue Nov 17, 2015 1:32 pm
I am currently following the Meaty skeleton page. I've copied (by writing it by hand) the code and the file structure and I'm currently at the step where you run the shell scripts.
First I run That one runs perfectly. Then I run Which also seem to work fine. But then it comes to That one ends with an error. The last few lines say: There you can see that I've got 1 error. The error says boot.S:32: undefined reference to `_init'. That's the line where you do call _init from the _start function.
I've tried to compare the code, and as far as I've seen I found no typos/errors. I guess the errors mean that it doesn't find _init anywhere in the code, and tells that the reference to it is undefined,
because like I said, it can't find it. I did find a post by Dennisbonke when searching google for "meaty skeleton _init" which was about a duplicate _init.
That is kindof what I'm looking for, but instead of 1 more of _init, I have 1 less of _init, In this case, I seem to have no _init.
So what could the problem be? why is _init undefined in boot.S when i actually declared it in crti.S?
First I run
Code: Select all
./clean.sh
Code: Select all
./headers.sh
Code: Select all
./iso.sh
Code: Select all
lf/4.9.2/crtend.o arch/i386/crtn.o -nostdlib -lk -lgcc
arch/i386/boot.o: In function `_start':
/home/kirdow/KirdOS/0.0.1/sysroot/kernel/arch/i386/boot.S:32: undefined reference to `_init'
collect2: error: ld returned 1 exit status
make: *** [kirdos.kernel] Error 1
make: Leaving directory `/home/kirdow/KirdOS/0.0.1/sysroot/kernel'
I've tried to compare the code, and as far as I've seen I found no typos/errors. I guess the errors mean that it doesn't find _init anywhere in the code, and tells that the reference to it is undefined,
because like I said, it can't find it. I did find a post by Dennisbonke when searching google for "meaty skeleton _init" which was about a duplicate _init.
That is kindof what I'm looking for, but instead of 1 more of _init, I have 1 less of _init, In this case, I seem to have no _init.
So what could the problem be? why is _init undefined in boot.S when i actually declared it in crti.S?