drop puts in favor of write, smaller main prog :D
This commit is contained in:
parent
fb8121c8e4
commit
ac747bbbf4
4 changed files with 925 additions and 1657 deletions
|
|
@ -1,17 +1,20 @@
|
|||
STRIP=riscv64-linux-gnu-strip
|
||||
CC=riscv64-linux-musl-gcc
|
||||
|
||||
OBJDUMP=riscv64-linux-gnu-objdump
|
||||
|
||||
.FAKE: all clean test
|
||||
|
||||
all: hello
|
||||
|
||||
all: hello hello-objdump.txt
|
||||
clean:
|
||||
rm -f hello
|
||||
rm -f hello-objdump.txt
|
||||
|
||||
hello: hello.c
|
||||
$(CC) -static -O2 -o hello hello.c
|
||||
|
||||
hello-objdump.txt: hello
|
||||
$(OBJDUMP) -d hello > hello-objdump.txt
|
||||
|
||||
test: hello
|
||||
./hello
|
||||
|
||||
|
|
|
|||
BIN
hello/hello
BIN
hello/hello
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -2,7 +2,7 @@
|
|||
#include <unistd.h>
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
const message = "Hello, world!\n";
|
||||
static const char message[] = "Hello, world!\n";
|
||||
write(STDIN_FILENO, message, strlen(message));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue