mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:34:59 +00:00
Kernel: Support loading the kernel at almost arbitrary virtual addresses
This enables further work on implementing KASLR by adding relocation support to the pre-kernel and updating the kernel to be less dependent on specific virtual memory layouts.
This commit is contained in:
parent
e3d2ca6bd2
commit
57417a3d6e
20 changed files with 123 additions and 87 deletions
|
@ -10,12 +10,19 @@
|
|||
#
|
||||
if [ "$SERENITY_ARCH" = "x86_64" ]; then
|
||||
gdb_arch=i386:x86-64
|
||||
prekernel_image=Prekernel64
|
||||
kernel_base=0x2000200000
|
||||
else
|
||||
gdb_arch=i386:intel
|
||||
prekernel_image=Prekernel
|
||||
kernel_base=0xc0200000
|
||||
fi
|
||||
|
||||
exec $SERENITY_KERNEL_DEBUGGER \
|
||||
-ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Kernel" \
|
||||
-ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Prekernel/$prekernel_image" \
|
||||
-ex "set confirm off" \
|
||||
-ex "add-symbol-file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Kernel -o $kernel_base" \
|
||||
-ex "set confirm on" \
|
||||
-ex "set arch $gdb_arch" \
|
||||
-ex 'target remote localhost:1234' \
|
||||
-ex "source $(dirname "$0")/serenity_gdb.py" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue