mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-25 06:14:18 +08:00
Update kernel recipe for GS segment TLS
This commit is contained in:
parent
4c52a95cec
commit
86ed70defd
@ -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
|
||||
|
||||
17
recipes/kernel/kernel_ld.sh
Executable file
17
recipes/kernel/kernel_ld.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/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" \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user