Skip to content

Commit

Permalink
Fix paging table .data section copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Nov 12, 2020
1 parent 3aab532 commit 6b0ff5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $(OBJ): $(OBJDIR)/%.o : $(SRCDIR)/%.S $(CONFIG_FILE) $(HEADER)
$(CC) -o $@ $< -c -I$(INCLUDE) $(ASFLAGS)

kernel.bin: $(TARGET)
@$(GCCPREFIX)objcopy -j .text -j .text.* -j .rodata -O binary -v $< $@
@$(GCCPREFIX)objcopy -j .text -j .text.* -j .rodata -j .data -O binary -v $< $@

kernel.asm: $(TARGET)
@$(GCCPREFIX)objdump -d -S $< > $@
Expand Down
3 changes: 3 additions & 0 deletions kernel/kern/kernel32.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ SECTIONS
.rodata : {
*(.rodata)
}
.data : {
*(.data)
}
}
3 changes: 3 additions & 0 deletions kernel/kern/kernel64.ld
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ SECTIONS
.rodata : {
*(.rodata)
}
.data : {
*(.data)
}
}

0 comments on commit 6b0ff5a

Please sign in to comment.