https://sourceware.org/bugzilla/show_bug.cgi?id=21128
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- [hjl@gnu-6 pr21128]$ cat x.c static int foo_static_0() { return 1; } static int foo_static_1() { return 1; } int main() { foo_static_0(); foo_static_1(); return 0; } [hjl@gnu-6 pr21128]$ make gcc -ffunction-sections -c -o x.o x.c ./ld --icf=safe -Map x.map -o x x.o ./ld -shared --icf=safe -Map x.so.map -o x.so x.os [hjl@gnu-6 pr21128]$ head -10 x.map Discarded input sections .text.foo_static_1 0x0000000000000000 0xb x.o .note.GNU-stack 0x0000000000000000 0x0 x.o Memory map [hjl@gnu-6 pr21128]$ head -10 x.so.map Discarded input sections .note.GNU-stack 0x0000000000000000 0x0 x.os Memory map ** file header 0x0000000000000000 0x40 [hjl@gnu-6 pr21128]$ Why can't foo_static_0 and foo_static_1 be folded in a shared object? -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils