Update kernel recipe for GS segment TLS

parent 4c52a95c
...@@ -6,8 +6,9 @@ randd ...@@ -6,8 +6,9 @@ randd
vesad T T G vesad T T G
stdio display:1 stdio display:1
ps2d us ps2d us
ramfs logging
pcid /etc/pcid/initfs.toml pcid /etc/pcid/initfs.toml
redoxfs --uuid $REDOXFS_UUID file redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
cd file: cd file:
export PATH file:/bin export PATH file:/bin
run.d /etc/init.d run.d /etc/init.d
#!/usr/bin/env bash
set -ex
LD="$1"
shift
if "${LD}" -z use-gs-for-tls 2>&1 |
grep "warning: -z use-gs-for-tls ignored" &> /dev/null
then
echo "Please update your prefix:" >&2
echo " rm -rf prefix" >&2
echo " make prefix" >&2
exit 1
fi
exec "${LD}" -z use-gs-for-tls "$@"
...@@ -5,15 +5,17 @@ function recipe_build { ...@@ -5,15 +5,17 @@ function recipe_build {
export INITFS_FOLDER="$(realpath ../sysroot)" export INITFS_FOLDER="$(realpath ../sysroot)"
mkdir -pv "$INITFS_FOLDER/etc" mkdir -pv "$INITFS_FOLDER/etc"
cp -v "$(realpath ../init.rc)" "$INITFS_FOLDER/etc/init.rc" cp -v "$(realpath ../init.rc)" "$INITFS_FOLDER/etc/init.rc"
xargo rustc \ cargo rustc \
--lib \ --lib \
--target "${ARCH}-unknown-none" \ --target "${ARCH}-unknown-none" \
--release \ --release \
-Z build-std=core,alloc \
-- \ -- \
-C soft-float \ -C soft-float \
-C debuginfo=2 \ -C debuginfo=2 \
-C lto \
--emit link=libkernel.a --emit link=libkernel.a
"${LD}" \ ../kernel_ld.sh "${LD}" \
--gc-sections \ --gc-sections \
-z max-page-size=0x1000 \ -z max-page-size=0x1000 \
-T "linkers/${ARCH}.ld" \ -T "linkers/${ARCH}.ld" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment