Created
April 27, 2015 21:36
-
-
Save 5kg/7304cf74bc0fe13a9f70 to your computer and use it in GitHub Desktop.
ub-icf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const char * const string; | |
static char *handle; | |
void foo() | |
{ | |
xxx(handle); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gcc -O2 -c -o foo.o foo.c && nm foo.o | |
0000000000000000 T foo | |
0000000000000000 b handle | |
0000000000000000 B string | |
U xxx | |
$ gcc -O2 -fno-ipa-icf -c -o foo.o foo.c && nm foo.o | |
0000000000000000 T foo | |
0000000000000008 C string | |
U xxx | |
$ gcc -v | |
Using built-in specs. | |
COLLECT_GCC=gcc | |
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper | |
Target: x86_64-unknown-linux-gnu | |
Configured with: /build/gcc/src/gcc-5.1.0/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --with-default-libstdcxx-abi=c++98 | |
Thread model: posix | |
gcc version 5.1.0 (GCC) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment