diff options
Diffstat (limited to 'build_helpers')
-rwxr-xr-x | build_helpers/compile.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build_helpers/compile.sh b/build_helpers/compile.sh index 90c2ee2..40cd293 100755 --- a/build_helpers/compile.sh +++ b/build_helpers/compile.sh @@ -5,9 +5,10 @@ set -e INPATH="$1" INBASEPATH="${INPATH%.*}" # mangle such that no two names conflict (a/b/c and a/b.c conflicting would be no fun) -OUTNAME="$(echo "$INBASEPATH" | sed 's/\./../g' | sed 's/\//._/g')" +#OUTNAME="$(echo "$INBASEPATH" | sed 's/\./../g' | sed 's/\//._/g')" +OUTNAME="src._kernel._main" echo -n "[*] Building '$INPATH' to 'tmp/$OUTNAME'... " -gcc -T linker.ld -m32 -Wl,--build-id=none -nostartfiles -nostdlib -ffreestanding "$INPATH" -o "tmp/$OUTNAME".o +gcc -T linker.ld -m32 -Wl,--build-id=none -nostartfiles -nostdlib -ffreestanding $INPATH -o "tmp/$OUTNAME".o echo " OK!" echo -n "[+] Stripping unnecessary sections... " objcopy -R .note.gnu.build-id -R .comment -O binary "tmp/$OUTNAME".o "bin/$OUTNAME".bin |