GNU ld ã®æåã§æ°ãä»ãããã¨ããã£ãã®ã§ã¡ã¢ã ä¾ã«ãã£ã¦å°ãåç½®ããé·ããªããã端çã«ããã°ãsystem call çã®ä»äººãæä¾ããé¢æ°å¼ã³åºããããã¯ãã¦ãå¦çã横åãããããªããã¨ããã¾ã«ããã ä¾ãã°ãsystem call ã® write(2) ãããã¯ããããªãã以ä¸ã®ãããªããã°ã©ã ãæ¸ããã¨ã«ãªãã 1 #include <dlfcn.h>  /* ãããå¿ è¦ */ 2 #include <unistd.h> /* ä»åhookããã write(2)ãå®ç¾©ããã¦ãã */ 3 #include <stdio.h> 4 #include <errno.h> 5 â hook ãããé¢æ°ããã®å ´åã¯write(2) ã¨åãããã«ããã 6 ssize_t (*org)(int fd, const void *buf, size_t count) = 0; 7 âm
{{#tags}}- {{label}}
{{/tags}}