Update kernel recipe for GS segment TLS

parent 4c52a95c
......@@ -6,8 +6,9 @@ randd
vesad T T G
stdio display:1
ps2d us
ramfs logging
pcid /etc/pcid/initfs.toml
redoxfs --uuid $REDOXFS_UUID file
redoxfs --uuid $REDOXFS_UUID file $REDOXFS_BLOCK
cd file:
export PATH file:/bin
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 {
export INITFS_FOLDER="$(realpath ../sysroot)"
mkdir -pv "$INITFS_FOLDER/etc"
cp -v "$(realpath ../init.rc)" "$INITFS_FOLDER/etc/init.rc"
xargo rustc \
cargo rustc \
--lib \
--target "${ARCH}-unknown-none" \
--release \
-Z build-std=core,alloc \
-- \
-C soft-float \
-C debuginfo=2 \
-C lto \
--emit link=libkernel.a
"${LD}" \
../kernel_ld.sh "${LD}" \
--gc-sections \
-z max-page-size=0x1000 \
-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