Linux ã®å ±æã©ã¤ãã©ãªãä½ãã¨ã PIC ã§ã³ã³ãã¤ã«ããã®ã¯ãªãã é常ãLinux ã®å ±æã©ã¤ãã©ãªãä½ãã¨ãã¯å .c ãã¡ã¤ã«ã PIC (Position Independent Code) ã¨ãªãããã³ã³ãã¤ã«ãã¾ããããããå®ã¯ PIC ã§ã³ã³ãã¤ã«ããªãã¦ãå ±æã©ã¤ãã©ãªã¯ä½ãã¾ããããã§ã¯ PIC ã«ããæå³ã¯ããã®ã§ããããã ãã£ããå®é¨ãã¦ã¿ã¾ãã int func () { printf(""); printf(""); printf(""); } PIC ã§ã³ã³ãã¤ã«ããã«ã¯ gcc ã« -fpic ã¾ã㯠-fPIC ã渡ãã¾ãã-fpic ã®æ¹ãå°ããé«éãªã³ã¼ããçæããå¯è½æ§ãããã¾ãããããã»ããµã«ãã£ã¦ã¯ -fpic ã§çæã§ãã GOT (Global Offset Table) ã®ãµã¤ãºã«å¶éãããã¾ããä¸æ¹ã-fPIC ã¯ã©ã®ããã»ããµã§
{{#tags}}- {{label}}
{{/tags}}