blob: 0e136e46deed3f3d4320958e54ff30e2b0b74edb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh -e
# :Tell hare to use our custom runtime
# and linker scripts (this feature is so simple and neat :))
export HAREPATH=.
# :Tell the linker to add this argument to discard
# unused sections
export LDFLAGS="--gc-sections"
# :Do the build
hare build -X^ -T+x86_64
# :Create a flat binary out of the elf file
# (while also removing the breaking gnu note)
objcopy \
--remove-section .note.gnu.property \
-I elf64-x86-64 -O binary \
--binary-architecture=i386:x86-64 \
boot boot.bin
bochs
|