

Kittur Ganesh (Intel) please let us know if you need any further clarification. # icc -fstack-protector-strong -gcc-name=/opt/gcc-4.9.2/bin/gcc test.c However, if the file is not present ("glibc-static" RPM is not installed), then the _stack_chk_guard symbol is present in the output.Īnd here is the compilations - # icc -fstack-protector-strong -gcc-name=/opt/gcc-4.9.2/bin/gcc test.c One of our developers found that the presence of the "/usr/lib64/libc.a" file from the "glibc-static" RPM disables the _stack_chk_guard symbol from being generated. Presumably for any given function it would get the same stack protector code no matter what machine you compile it on, since you have the same compilers and os everywhere. However, if the _stack_chk_guard is indeed present, I am now forced to add a "-L/opt/gcc-4.9.1/lib64 -lssp" or I get "Undefined reference to _stack_chk_guard" errors all over the place. opt/intel/composer_xe_2016.2.181/bin/intel64/icc -o stream -static-intel -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro stream.o -liomp5 -pie When the _stack_chk_guard is not found in the symbols, I am able to build the binary by simply executing. What in the machine environment could be producing the difference where an object file built in one machine has _stack_chk_guard and the object file built on another does not? The ICC version and GCC-4.9.1 are completely identical. When I look up symbols in stream.o with "nm", I see a _stack_chk_guard symbol in some machines, and the symbol is missing from the object file built on other machines.

opt/intel/composer_xe_2016.2.181/bin/intel64/icc -o stream.o -c -Wall -Wformat -Wformat-security -Wparentheses -fstack-protector-strong -g -O0 -gcc-name=/opt/gcc-4.9.1/bin/gcc -gxx-name=/opt/gcc-4.9.1/bin/g++ -O3 -openmp -DSTREAM_ARRAY_SIZE=64000000 -opt-prefetch-distance=64,8 -opt-streaming-cache-evict=0 -opt-streaming-stores always -axMIC-AVX512 -DDEBUG -D_FORTIFY_SOURCE=2 /stream/src/stream.c -fPIEĬentOS 6 ships with GCC 4.4.7 by default, we need C++11 support, so we have installed gcc-4.9.1 in /opt/gcc-4.9.1 I am building some sources on CentOS 6 with the following command
