Asfy
Asfy

Reputation: 79

mit6.828 jos lab1 qemu Triple fault

I prepare the toolchain with the guide Tools Used in 6.828. I get a treple fault when runing lab1:

enter image description here

When I comment out the call memset() and monitor() like the code below, it just runs but the keyboard does not work:

enter image description here

I compare my compiled kernel with other's. I find the elf format of kernel has more sections. like .got, .got.plt, just the Idx 5 6 7 8 in the picture enter image description here

I think there must be toolchain's faults.Can I do this lab with gcc with new version, how can I do to fix that? Thanks

Upvotes: 2

Views: 1252

Answers (1)

Asfy
Asfy

Reputation: 79

OK, now I make it.

Compared with the makefile of xv6, I find a option of gcc not present in the GNUmakefile of lab1.

So add -fno-pic to CFLAGS in GNUMakefile

That will be done.

I will email to staff of 6.828. When they change the file, I will delete this question.

Upvotes: 3

Related Questions