mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Kernel: Build the x86_64 kernel as an ELF32 executable
Multiboot only supports ELF32 executables. This changes the build process to build an ELF32 executable which has a 32-bit entry point, but consists of mostly 64-bit code.
This commit is contained in:
parent
04ba5cfcad
commit
c9747a3236
3 changed files with 37 additions and 11 deletions
|
@ -8,9 +8,17 @@
|
|||
# remote on localhost:1234. So point our debugger there, and inform
|
||||
# the debugger which binary to load symbols, etc from.
|
||||
#
|
||||
if [ "$SERENITY_ARCH" = "x86_64" ]; then
|
||||
gdb_arch=i386:x86-64
|
||||
kernel_binary=Kernel64
|
||||
else
|
||||
gdb_arch=i386:intel
|
||||
kernel_binary=Kernel
|
||||
fi
|
||||
|
||||
exec $SERENITY_KERNEL_DEBUGGER \
|
||||
-ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/Kernel" \
|
||||
-ex 'set arch i386:intel' \
|
||||
-ex "file $(dirname "$0")/../Build/${SERENITY_ARCH:-i686}/Kernel/$kernel_binary" \
|
||||
-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