diff options
Diffstat (limited to 'src/user/app/testelf/main.c')
-rw-r--r-- | src/user/app/testelf/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/user/app/testelf/main.c b/src/user/app/testelf/main.c index a3e54b8..5111791 100644 --- a/src/user/app/testelf/main.c +++ b/src/user/app/testelf/main.c @@ -1,9 +1,12 @@ #include <stdio.h> -const char *str = "Hello!\n", *str2 = "World.\n"; +const char *str = "Hello!", *str2 = "World."; -int main(void) { +int main(int argc, char **argv, char **envp) { printf("elftest's &main == 0x%x\n", &main); - printf("%s%s", str, str2); + printf("%s %s\n", str, str2); + printf("argc == 0x%x\n", argc); + for (int i = 0; i < argc; i++) + printf("argv[0x%x] == 0x%x == \"%s\"\n", i, argv[i], argv[i]); return 0; } |