You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My build of ucore kernel won't start properly and enters a reboot cycle. I compared my build with a working build and found that the GDT Descriptor that's used in pmm_init() is replaced with zero value when memset(edata, 0, end - edata) is performed.
Disassembly shows that the pmm.o has the GDT Descriptor in section .data.rel.local rather than .data.
After linking, this address is put after .data section in Kernel. This means that the edata symbol defining the end of the .data section will appear before the GDT Descriptor.
The text was updated successfully, but these errors were encountered:
FishyFizz
changed the title
Linker script for Kernel can be modified to be compatible with newer GCC
Linker script for Kernel can be modified to be more compatible.
Apr 8, 2022
My build of ucore kernel won't start properly and enters a reboot cycle. I compared my build with a working build and found that the GDT Descriptor that's used in pmm_init() is replaced with zero value when
memset(edata, 0, end - edata)
is performed.Disassembly shows that the pmm.o has the GDT Descriptor in section
.data.rel.local
rather than.data
.After linking, this address is put after
.data
section in Kernel. This means that theedata
symbol defining the end of the.data
section will appear before the GDT Descriptor.Modify the linker script and make all data type section before
edata
symble will fix the issue and the kernel will run fine.The text was updated successfully, but these errors were encountered: