From 399fd0dd8523886579e354e667cb15688c0bda89 Mon Sep 17 00:00:00 2001 From: Iacobai Cosmin-Andrei Date: Thu, 17 Oct 2024 19:35:11 +0300 Subject: [PATCH] libc/reading: Fixed paths Modified `student@os:~/.../common-functions/support` path to `student@os:~/.../common-functions/support/src` to show the correct location to run some commands. Signed-off-by: Iacobai Cosmin-Andrei --- chapters/software-stack/libc/reading/common-functions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chapters/software-stack/libc/reading/common-functions.md b/chapters/software-stack/libc/reading/common-functions.md index 90b7f1caf7..2777e3f912 100644 --- a/chapters/software-stack/libc/reading/common-functions.md +++ b/chapters/software-stack/libc/reading/common-functions.md @@ -19,16 +19,16 @@ We print messages using the `write()` system call wrapper implemented in `syscal Let's build and run the program: ```console -student@os:~/.../common-functions/support$ make main_string +student@os:~/.../common-functions/support/src$ make main_string gcc -fno-PIC -fno-stack-protector -c -o main_string.o main_string.c gcc -fno-PIC -fno-stack-protector -c -o os_string.o os_string.c nasm -f elf64 -o syscall.o syscall.s gcc -nostdlib -no-pie -Wl,--entry=main -Wl,--build-id=none main_string.o os_string.o syscall.o -o main_string -student@os:~/.../common-functions/support$ ./main_string +student@os:~/.../common-functions/support/src$ ./main_string Destination string is: warhammer40k -student@os:~/.../common-functions/support$ strace ./main_string +student@os:~/.../common-functions/support/src$ strace ./main_string execve("./main_string", ["./main_string"], 0x7ffd544d0a70 /- 63 vars */) = 0 write(1, "Destination string is: ", 23Destination string is: ) = 23 write(1, "warhammer40k\n", 13warhammer40k