ã¨Binary Hacks#29ãè¦ãªãããé«æãããdisã£ã¦è¦ããã¹ã :-) ã¨ãã¼ããã§ãã¹ã 以ä¸ã®ãã¡ã¤ã«ãæºå foo.c extern void bar(void); void foo(void){ printf("foo\n"); bar(); } bar.c void bar(void){ printf("bar\n"); } libfoo.map { global: foo; local: *; }; ãããã®ãã¼ã¸ã§ã³ã¹ã¯ãªããã¯fooé¢æ°ä»¥å¤ã¯ã©ã¤ãã©ãªå¤ãã å¼ã¹ãªããããããã£ã¦æå³ããï¼ Binary Hackèªãã§ãªã人㸠ãã§ä»¥ä¸ã®ããã«ã³ã³ãã¤ã« gcc -shared foo.c bar.c -o libfoo.so -Wl,--version-script,libfoo.map ã㧠objdump -d ãã¦ãfooé¢æ°ãè¦ãã¨ä»¥ä¸ 000000
{{#tags}}- {{label}}
{{/tags}}