Skip to content
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

Remove BYTE directives from kernel linker script to fix triple fault on boot #115

Merged
merged 1 commit into from
Aug 10, 2020

Conversation

48ca
Copy link
Contributor

@48ca 48ca commented Jan 22, 2020

When compiling with binutils version >=2.33, xv6 will triple fault on boot. Although this may be a regression in binutils, this PR will prevent the triple fault.

For binutils >=2.33, the BYTE directives produce an incorrect physical address for the second LOAD memory segment in the ELF header of kernel. This can be observed with objdump -x kernel after compiling. I'm not sure why this happens; there may be other ways to fix the problem.

This bug was noticed because this version of xv6 is used for a course at the University of Virginia.

@mk6502
Copy link

mk6502 commented Feb 29, 2020

Thanks for this. Confirming it solved the problem on Ubuntu 19.10.

@nwolovick
Copy link

Confirm this solves the problem on an up-to-date Debian testing.

@YibaiMeng
Copy link

Confirm this also solves the problem on x86_64 Ubuntu 19.10.

@Hertz1239
Copy link

Confirm this works on x86_64 ubuntu 19.10

@Omarfos
Copy link

Omarfos commented Mar 10, 2020

Confirm this works on mac os Catalina

@karthik1107
Copy link

It isn't working in kali linux

@ghost
Copy link

ghost commented Apr 6, 2020

works on ubuntu 19.10, thanks!

RAFOperativniSistemi pushed a commit to RAFOperativniSistemi/xv6-raf that referenced this pull request Apr 15, 2020
See mit-pdos/xv6-public#115
Both sections appear to be redundant since gdb works fine without them and
the kernel already has .symtab and .strtab, which appear to be the
actually relevant sections.
@t812206236
Copy link

Thank you very much, this works fine under mac, the compilation tool is homebrew (x86_64-elf-gcc 9.3.0 and qemu 4.2.0)

@cneally
Copy link

cneally commented May 2, 2020

Works on Ubuntu 20.04, Thanks

Copy link

@hadeutscher hadeutscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solves the issue on Ubuntu 20.04

@binarytom
Copy link

thanks a lot, it works on my ubuntu 20.04.

@coded7861
Copy link

Thanks for the fix. Works on Ubuntu 20.04.

MAHMOOD-SH pushed a commit to MAHMOOD-SH/PHASE_2 that referenced this pull request Jul 4, 2020
REMOVING BYTE(0) TO SOLVE ISSUE 115 WITH QEMU. SEE: mit-pdos#115
@grzkv
Copy link

grzkv commented Jul 7, 2020

Thanks! Solves the issue for me on Ubuntu 19.10.

@Lotus-95
Copy link

Lotus-95 commented Aug 3, 2020

Thx. It works on Ubuntu 20.04.

@kaashoek kaashoek merged commit 1db17ac into mit-pdos:master Aug 10, 2020
@cheng3100
Copy link

Ubuntu 20.04 confirm ok. By the way I check the result of objdump -x kernel , right is fix, left is wrong version. I found that the LMA is wrong since the .stab sections, It is in fact the VMA because it beyonds 0x8000000. Does anyone have thoughts of the cause about the problem?
图片

wabscale added a commit to AnubisLMS/xv6 that referenced this pull request Aug 30, 2020
marona42 added a commit to marona42/univ-assignments that referenced this pull request Oct 7, 2020
@tglanz
Copy link

tglanz commented Nov 16, 2020

solves the issue on x86_64 Linux 5.9.1-arch-1

@austintraver
Copy link

Solves the issue on macOS 11.0 Big Sur

@ghost
Copy link

ghost commented Jan 30, 2021

Thanks. Solved the issue for me as well. well done.

fepz added a commit to so1unp/xv6-public that referenced this pull request Mar 17, 2021
fepz added a commit to fepz/xv6-public that referenced this pull request Mar 17, 2021
@ceciivanov
Copy link

hello I need help on commiting with this request, I tried in terminal git and it says there is not such file in git... any help?

@zhongyoub
Copy link

zhongyoub commented Dec 7, 2021 via email

CoderSherlock added a commit to CoderSherlock/xv6_base that referenced this pull request Jan 31, 2022
vini2001 pushed a commit to vini2001/xv6-public that referenced this pull request Feb 1, 2022
Remove BYTE directives from kernel linker script to fix triple fault on boot
heptagon-nmt pushed a commit to heptagon-nmt/xv6 that referenced this pull request Sep 14, 2022
Remove BYTE directives from kernel linker script to fix triple fault on boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet