As part of our build process, we generate a map file when compiling our executable file. For instance:
g++ -Wl,-Map,/tmp/foo.map -o foo foo.cpp
In an attempt to migrate from GCC 4.3 / 4.4 to GCC 4.9, we installed a new build server. The map file created by the assembly server 4.9 does not have malformed symbol names. The map file created by the build servers 4.3 / 4.4 does this. For example, doing the above with 4.3, I get this in the map file:
.plt 0x0000000000400700 0x90 /usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64/crt1.o 0x0000000000400710 _ZNSolsEi@ @GLIBCXX_3.4 0x0000000000400720 _ZNSt8ios_base4InitC1Ev@ @GLIBCXX_3.4 0x0000000000400730 __libc_start_main@ @GLIBC_2.2.5
Running the same code against 4.9 I get the following snippet:
.plt 0x00000000004006e0 0x80 /usr/lib/../lib64/crt1.o 0x00000000004006f0 std::ostream::operator<<(int)@@GLIBCXX_3.4 0x0000000000400700 std::ios_base::Init::Init()@@GLIBCXX_3.4 0x0000000000400710 __libc_start_main@ @GLIBC_2.2.5 0x0000000000400720 __cxa_atexit@ @GLIBC_2.2.5
Is this change expected? Is there a way to generate garbled output using gcc 4.9 (some kind of backward compatibility option)? I ask, because the later tools in our assembly use a symbol file and choke on untied names.
source share