Replace The Macro In The GCC Link Script
Run gcc -E -D BOOTDIR=$(pwd) -P -x c boot/arch/riscv/boot0.lds
-E
Preprocess only; do not compile, assemble or link.-D
Define macro.-P
Inhibit generation of linemarkers in the output from the preprocessor.[a]
Demo
pwd
/home/source/workspace/riscv-flare
sed -n '9,12p' boot/arch/riscv/boot0.lds
.head :
{
BOOTDIR/boot0_head.o (.rodata)
}
gcc -E -D BOOTDIR=$(pwd) -P -x c boot/arch/riscv/boot0.lds | sed -n '8,11p'
.head :
{
/home/source/workspace/riscv-flare/boot0_head.o (.rodata)
}