http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59973
Bug ID: 59973 Summary: Creates a 32GB unused bss symbol with -fprofile-generate Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: mh+gcc at glandium dot org $ g++-4.7 -o - -S Value.ii -std=gnu++0x -O1 -fprofile-generate (snip) .quad .LPBX1 .local .LPBX1 .comm .LPBX1,34359738368,64 $ g++-4.7 -o Value.o -c Value.ii -std=gnu++0x -O1 -fprofile-generate $ readelf -SW /tmp/Value.o | grep bss [ 5] .bss NOBITS 0000000000000000 000100 800000000 00 WA 0 0 64 Note this doesn't happen with gcc 4.8. This happens with current 4.7.3 from Debian (4.7.3-10 as of writing) and a locally built vanilla gcc 4.7.3. Further down the road, this makes code fail to link because the linker can't do R_X86_64_PC32 relocations across the 32GB gap (text relocations for acesses to bss symbols that happen to be after that one).