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

kernel.ld is not working correctly #288

Open
HHHHao-s opened this issue Oct 30, 2024 · 1 comment
Open

kernel.ld is not working correctly #288

HHHHao-s opened this issue Oct 30, 2024 · 1 comment

Comments

@HHHHao-s
Copy link

kernel.ld is not working correctly. If I adjust the order of OBJS in Makefile and place $K/entry.o at the end, the _start function does not appear at the address 0x80000000. I suspect that the linker places functions according to the order in which it receives the files, I don't know if you are using such feature, but it seems better to place the function explicitly.And I will open a pr in order to fix it.

@schmitts
Copy link

Hi!

I was also coming across that issue while adding cmake for compiling xv6. I've added an assert:

https://github.com/xv6-guide/xv6-riscv/blob/aaadc2479a13eae5d405980f5e0f48bb6330354d/kernel/kernel.ld#L46

and a comment that entry must be given first:

https://github.com/xv6-guide/xv6-riscv/blob/aaadc2479a13eae5d405980f5e0f48bb6330354d/CMakeLists.txt#L104

I will try your much nicer solution asap.

Cheers, Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants