public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
@ 2011-11-12 23:36 markus at trippelsdorf dot de
  2011-11-13 11:31 ` [Bug gcov-profile/51113] " nathan at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-12 23:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

             Bug #: 51113
           Summary: [4.7 regression] rev. 181105 causes Firefox
                    profiledbuild failure
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: markus@trippelsdorf.de


Firefox fails to build during the -fprofile-generate phase 
of a "profiledbuild":

c++ -o js  -fno-rtti -pedantic -Wall -Wpointer-arith -Woverloaded-virtual
-Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -W
no-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long
-march=native -fvisibility-inlines-hidden -Wno-delete-non-virtual-dtor -p
thread -pipe  -DNDEBUG -DTRIMMED -fprofile-generate -O3 -fomit-frame-pointer
js.i_o jsworkers.i_o jsoptparse.i_o jsheaptools.i_o   -lpthread -Wl,-O1,
--hash-style=gnu,--as-needed,--no-keep-memory,--gc-sections  -fprofile-generate
-Wl,-rpath-link,../../../dist/bin -Wl,-rpath-link,/var/tmp/mozilla-ce
ntral/moz-build-dir/dist/lib   -Wl,--whole-archive
../../../dist/lib/libmozutils.a -Wl,--no-whole-archive -rdynamic
-L../../../dist/bin -L../../../di
st/lib -Wl,-R/usr/lib64 -L/usr/lib64 -lplds4 -lplc4 -lnspr4 -lpthread -ldl
../editline/libeditline.a ../libjs_static.a -ldl    
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail12StringOptionD1Ev' is not defi
ned locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail12StringOptionD0Ev' is not defi
ned locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZNK2js3cli6detail12ValuedOption8isValuedEv' is 
not defined locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for js::cli::detail::IntOption:
warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail9IntOptionD1Ev' is not defined 
locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for js::cli::detail::IntOption:
warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail9IntOptionD0Ev' is not defined 
locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for js::cli::detail::IntOption:
warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZNK2js3cli6detail12ValuedOption8isValuedEv' is 
not defined locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::MultiStringOption: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail17MultiStringOptionD1Ev' is not
 defined locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::MultiStringOption: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail17MultiStringOptionD0Ev' is not
 defined locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::MultiStringOption: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZNK2js3cli6detail12ValuedOption8isValuedEv' is 
not defined locally
...

I've git bisected this to the following commit:
5014df5d02d9d90bb0a749a035f86bbfbe94bfa4 is the first bad commit
commit 5014df5d02d9d90bb0a749a035f86bbfbe94bfa4
Author: nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Nov 7 18:14:46 2011 +0000

        libgcc/
        * libgcov.c (struct gcov_fn_buffer): New struct.
        (buffer_fn_data): New helper.
        (gcov_exit): Rework for new gcov data structures.

        gcc/
        * gcov.c (object_summary): Replace with ...
        (object_runs): ... this.
        (process_file): Remove functions with no data.
        (generate_results): Ignore files with no lines.
        (release_function): New helper, broken out of ...
        (release_structures): ... here.  Use it.
        (read_count_file): Adjust for new data file format.
        (output_lines): Use object_runs.
        * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Obsolete.
        (struct gcov_ctr_info): Move definition.
        (struct gcov_fn_info): Add key field, use gcov_ctr_info for
        trailing array.
        (struct gcov_info): Add merge function array, remove mask and
        counts.  Trailing array is array of pointers to function info.
        * coverage.c (struct function_list): Replace counter numbers with
        counter arrays.  Add fndecl field.  GTYify.
        (counts_entry): Remove chain workspace.
        (functions_head): GTYify.
        (prg_n_ctrs): Remove.
        (fn_v_ctrs): New.
        (tree_ctr_tables): Remove.
        (read_counts_file): Cope with blank entries and expect program
        summaries before functions.  Don't warn on missing entries.
        (coverage_counter_alloc): Allocate individual function arrays.
        (tree_coverage_counter_ref, tree_coverage_counter_addr): Adjust
        for individual function arrays.
        (coverage_end_function): GTYify function list object. Finalize
        function's counter arrays.
        (build_var): New.  Create a counter-related variable with
        appropriate linkage.
        (build_fn_info_type): Adjust for new runtime structure.
        (build_fn_info_value): Rename to ...
        (build_fn_info): ... here.  Build new format data.
        (build_ctr_info_type, build_ctr_info_value): Remove.
        (build_info_type): New. Build new format data structure.
        (build_info): Adjust for new format data.
        (create_coverage): Likewise.
        * gcov-dump.c (tag_function): Recognize placeholders.

        gcc/testsuite/
        * gcc.dg/profile-dir-1.c: Adjust final scan.
        * gcc.dg/profile-dir-2.c: Adjust final scan.
        * gcc.dg/profile-dir-3.c: Adjust final scan.
        * gcc.misc-tests/gcov.exp: Adjust regexp.
        * gcc.misc-tests/gcov-12.c: New.
        * gcc.misc-tests/gcov-13.c: New.
        * gcc.misc-tests/gcovpart-13b.c: New.
        * gcc.misc-tests/gcov-14.c: New.



    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181105
138bc75d-0d04-0410-961f-82ee72b054a4

Reverting the commit "fixes" the problem.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
@ 2011-11-13 11:31 ` nathan at gcc dot gnu.org
  2011-11-13 12:39 ` markus at trippelsdorf dot de
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at gcc dot gnu.org @ 2011-11-13 11:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu.org

--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> 2011-11-13 10:08:52 UTC ---
hm, at a wild guess it looks like  -fvisibility-inlines-hidden is not being
taken into consideration in my patch.  If you build without that option, does
it succeed?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
  2011-11-13 11:31 ` [Bug gcov-profile/51113] " nathan at gcc dot gnu.org
@ 2011-11-13 12:39 ` markus at trippelsdorf dot de
  2011-11-13 14:00 ` markus at trippelsdorf dot de
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-13 12:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-13 10:29:54 UTC ---
(In reply to comment #1)
> hm, at a wild guess it looks like  -fvisibility-inlines-hidden is not being
> taken into consideration in my patch.  If you build without that option, does
> it succeed?

Unfortunately no. I still get the same error as before.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
  2011-11-13 11:31 ` [Bug gcov-profile/51113] " nathan at gcc dot gnu.org
  2011-11-13 12:39 ` markus at trippelsdorf dot de
@ 2011-11-13 14:00 ` markus at trippelsdorf dot de
  2011-11-15  8:36 ` markus at trippelsdorf dot de
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-13 14:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-13 13:07:15 UTC ---
Please note that this happens with the gold linker.
When I use ld.bfd the build fails much later (during libxul linking).


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (2 preceding siblings ...)
  2011-11-13 14:00 ` markus at trippelsdorf dot de
@ 2011-11-15  8:36 ` markus at trippelsdorf dot de
  2011-11-15  9:02 ` markus at trippelsdorf dot de
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-15  8:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-15 07:58:50 UTC ---
Full error message:

c++ -o js.i_o -c  -I../../../dist/system_wrappers_js -include
/var/tmp/mozilla-central/js/src/config/gcc_hidden.h -DEXPORT_JS_API
-DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -I/var/tmp/mozilla-central/js/src -I..
-I/var/tmp/mozilla-central/js/src/shell -I. -I../../../dist/include
-I../../../dist/include/nsprpub  -I/usr/include/nspr   -fPIC  -fno-rtti
-pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -Wno-long-long -march=native
-Wno-delete-non-virtual-dtor -pthread -pipe  -DNDEBUG -DTRIMMED
-fprofile-generate -O3 -fomit-frame-pointer   -DMOZILLA_CLIENT -include
../js-confdefs.h -MD -MF .deps/js.pp
/var/tmp/mozilla-central/js/src/shell/js.cpp
jsoptparse.cpp
c++ -o jsoptparse.i_o -c  -I../../../dist/system_wrappers_js -include
/var/tmp/mozilla-central/js/src/config/gcc_hidden.h -DEXPORT_JS_API
-DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -I/var/tmp/mozilla-central/js/src -I..
-I/var/tmp/mozilla-central/js/src/shell -I. -I../../../dist/include
-I../../../dist/include/nsprpub  -I/usr/include/nspr   -fPIC  -fno-rtti
-pedantic -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof
-Wno-variadic-macros -Werror=return-type -Wno-long-long -march=native
-Wno-delete-non-virtual-dtor -pthread -pipe  -DNDEBUG -DTRIMMED
-fprofile-generate -O3 -fomit-frame-pointer   -DMOZILLA_CLIENT -include
../js-confdefs.h -MD -MF .deps/jsoptparse.pp
/var/tmp/mozilla-central/js/src/shell/jsoptparse.cpp
/usr/bin/python2.7 /var/tmp/mozilla-central/js/src/config/pythonpath.py
-I../config /var/tmp/mozilla-central/js/src/config/expandlibs_exec.py --uselist
--  c++ -o js  -fno-rtti -pedantic -Wall -Wpointer-arith -Woverloaded-virtual
-Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align
-Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -Wno-long-long
-march=native -Wno-delete-non-virtual-dtor -pthread -pipe  -DNDEBUG -DTRIMMED
-fprofile-generate -O3 -fomit-frame-pointer js.i_o jsworkers.i_o jsoptparse.i_o
jsheaptools.i_o   -lpthread
-Wl,-O1,--hash-style=gnu,--as-needed,--no-keep-memory,--gc-sections 
-fprofile-generate -Wl,-rpath-link,../../../dist/bin
-Wl,-rpath-link,/var/tmp/mozilla-central/moz-build-dir/dist/lib  
-Wl,--whole-archive ../../../dist/lib/libmozutils.a -Wl,--no-whole-archive
-rdynamic -L../../../dist/bin -L../../../dist/lib -Wl,-R/usr/lib64 -L/usr/lib64
-lplds4 -lplc4 -lnspr4 -lpthread -ldl ../editline/libeditline.a
../libjs_static.a -ldl
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail12StringOptionD1Ev' is not defined
locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail12StringOptionD0Ev' is not defined
locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for js::cli::detail::IntOption:
warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail9IntOptionD1Ev' is not defined locally
jsoptparse.i_o:jsoptparse.cpp:function vtable for js::cli::detail::IntOption:
warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail9IntOptionD0Ev' is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintProp: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintProp: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintCallProp: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintCallProp: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSetElement: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSetElement: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintCall: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintCall: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintPropagateThis: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintPropagateThis: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintArith: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintArith: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintTransformThis: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintTransformThis: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSubset: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSubset: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFilterPrimitive: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFilterPrimitive: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSubsetBarrier: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintSubsetBarrier: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintLazyArguments: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreeze: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreeze: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeTypeTag: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeTypeTag: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeObjectFlags: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeObjectFlagsSet: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeObjectFlagsSet: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeOwnProperty: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintClearDefiniteSetter: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintClearDefiniteSetter: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintClearDefiniteSingle: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintClearDefiniteSingle: warning: relocation refers to discarded
section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeGlobal: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint16newPropertyStateEP9JSContextPNS0_7TypeSetE' is
not defined locally
../libjs_static.a(jsinfer.i_o):jsinfer.cpp:function vtable for
TypeConstraintFreezeGlobal: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol
'_ZN2js5types14TypeConstraint14newObjectStateEP9JSContextPNS0_10TypeObjectEb'
is not defined locally
../libjs_static.a(jsweakmap.i_o):jsweakmap.cpp:function vtable for
js::WeakMapBase: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js11WeakMapBaseD1Ev' is not defined locally
../libjs_static.a(jsweakmap.i_o):jsweakmap.cpp:function vtable for
js::WeakMapBase: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js11WeakMapBaseD0Ev' is not defined locally
collect2: error: ld returned 1 exit status
make[6]: *** [js] Error 1
make[6]: Leaving directory
`/var/tmp/mozilla-central/moz-build-dir/js/src/shell'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/var/tmp/mozilla-central/moz-build-dir/js/src'
make[4]: *** [libs_tier_js] Error 2
make[4]: Leaving directory `/var/tmp/mozilla-central/moz-build-dir'
make[3]: *** [tier_js] Error 2
make[3]: Leaving directory `/var/tmp/mozilla-central/moz-build-dir'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/var/tmp/mozilla-central/moz-build-dir'
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory `/var/tmp/mozilla-central'
make: *** [profiledbuild] Error 2


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (3 preceding siblings ...)
  2011-11-15  8:36 ` markus at trippelsdorf dot de
@ 2011-11-15  9:02 ` markus at trippelsdorf dot de
  2011-11-15  9:34 ` markus at trippelsdorf dot de
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-15  9:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-15 08:36:01 UTC ---
Take the first error as an example:

jsoptparse.i_o:jsoptparse.cpp:function vtable for
js::cli::detail::StringOption: warning: relocation refers to discarded section
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: hidden symbol '_ZN2js3cli6detail12StringOptionD1Ev' is not defined
locally

 % c++filt _ZN2js3cli6detail12StringOptionD1Ev
js::cli::detail::StringOption::~StringOption()

This is a virtual destructor that is defined in js/src/shell/jsoptparse.h:

struct StringOption : public ValuedOption
{
    const char *value;

    StringOption(char shortflag, const char *longflag, const char *help, const
char *metavar)
      : ValuedOption(OptionKindString, shortflag, longflag, help, metavar),
value(NULL)
    {}

    virtual ~StringOption() {}
};

This header is included in js/src/shell/jsoptparse.c. And in there you 
find the following line:

StringOption *so = OffTheBooks::new_<StringOption>(1, name, help, (const char
*) NULL);


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (4 preceding siblings ...)
  2011-11-15  9:02 ` markus at trippelsdorf dot de
@ 2011-11-15  9:34 ` markus at trippelsdorf dot de
  2011-11-15 10:09 ` markus at trippelsdorf dot de
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-15  9:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #6 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-15 08:57:41 UTC ---
 % c++ -o jsoptparse.i_o -c -I../../../dist/system_wrappers_js -include
/var/tmp/mozilla-central/js/src/config/gcc_hidden.h -DEXPORT_JS_API
-DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -I/var/tmp/mozilla-central/js/src -I..
-I/var/tmp/mozilla-central/js/src/shell -I. -I../../../dist/include
-I../../../dist/include/nsprpub -I/usr/include/nspr -fPIC -fno-rtti -pedantic
-Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy
-Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros
-Werror=return-type -Wno-long-long -march=native -Wno-delete-non-virtual-dtor
-pthread -pipe -DNDEBUG -DTRIMMED -fprofile-generate -O3 -fomit-frame-pointer
-DMOZILLA_CLIENT -include ../js-confdefs.h -MD -MF .deps/jsoptparse.pp
/var/tmp/mozilla-central/js/src/shell/jsoptparse.cpp

Compiled with gcc-4.7.0:

 % readelf -lSW moz-build-dir/js/src/shell/jsoptparse.i_o | grep 12StringOption
  [61] .text._ZN2js3cli6detail12StringOptionD0Ev PROGBITS       
0000000000000000 0041e0 00006a 00 AXG  0   0 32
  [62] .rela.text._ZN2js3cli6detail12StringOptionD0Ev RELA           
0000000000000000 01a350 000108 18     207  61  8
  [63] .text._ZN2js3cli6detail12StringOptionD2Ev PROGBITS       
0000000000000000 004260 00005b 00 AXG  0   0 32
  [64] .rela.text._ZN2js3cli6detail12StringOptionD2Ev RELA           
0000000000000000 01a458 0000d8 18     207  63  8
  [108] .bss.__gcov0__ZN2js3cli6detail12StringOptionD0Ev NOBITS         
0000000000000000 006470 000010 00 WAG  0   0 16
  [109] .data.rel.ro._ZTVN2js3cli6detail12StringOptionE PROGBITS       
0000000000000000 006480 000030 00 WAG  0   0 32
  [110] .rela.data.rel.ro._ZTVN2js3cli6detail12StringOptionE RELA           
0000000000000000 01c9a8 000060 18     207 109  8
  [113] .bss.__gcov0__ZN2js3cli6detail12StringOptionD2Ev NOBITS         
0000000000000000 0064f0 000008 00 WAG  0   0  8
  [161] .data.rel.local.__gcov___ZN2js3cli6detail12StringOptionD0Ev PROGBITS   
    0000000000000000 006d00 000038 00 WAG  0   0 32
  [162] .rela.data.rel.local.__gcov___ZN2js3cli6detail12StringOptionD0Ev RELA  
         0000000000000000 01d6c8 000030 18     207 161  8
  [163] .data.rel.local.__gcov___ZN2js3cli6detail12StringOptionD2Ev PROGBITS   
    0000000000000000 006d40 000038 00 WAG  0   0 32
  [164] .rela.data.rel.local.__gcov___ZN2js3cli6detail12StringOptionD2Ev RELA  
         0000000000000000 01d6f8 000030 18     207 163  8


Compiled with gcc-4.6.2:

 % readelf -lSW moz-build-dir/js/src/shell/jsoptparse.i_o | grep 12StringOption
  [48] .text._ZN2js3cli6detail12StringOptionD0Ev PROGBITS       
0000000000000000 003aa0 000050 00 AXG  0   0 32
  [49] .rela.text._ZN2js3cli6detail12StringOptionD0Ev RELA           
0000000000000000 00f4d0 0000d8 18     100  48  8
  [50] .text._ZN2js3cli6detail12StringOptionD2Ev PROGBITS       
0000000000000000 003b00 000041 00 AXG  0   0 32
  [51] .rela.text._ZN2js3cli6detail12StringOptionD2Ev RELA           
0000000000000000 00f5a8 0000a8 18     100  50  8
  [88] .data.rel.ro._ZTVN2js3cli6detail12StringOptionE PROGBITS       
0000000000000000 004b60 000030 00 WAG  0   0 32
  [89] .rela.data.rel.ro._ZTVN2js3cli6detail12StringOptionE RELA           
0000000000000000 010580 000060 18     100  88  8


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (5 preceding siblings ...)
  2011-11-15  9:34 ` markus at trippelsdorf dot de
@ 2011-11-15 10:09 ` markus at trippelsdorf dot de
  2011-11-15 20:28 ` nathan at acm dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-15 10:09 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #7 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-15 10:03:05 UTC ---
Here is a small testcase:

 % cat test.ii
extern "C"
{
    typedef long unsigned int size_t;
}
extern "C"
{
    static inline void *js_malloc (size_t bytes)
    {
    }
}
namespace std
{
typedef long unsigned int size_t;
}
extern "C++"
{
    inline void *operator  new (std::size_t, void *__p) throw ()
    {
    }
    class OffTheBooks
    {
    public:
        template < class T >
        __attribute__ ((always_inline)) inline static T *new_ () {
        }
        template < class T, class P1, class P2, class P3, class P4 >
         __attribute__ ((always_inline)) inline static T *new_ 
                   (P1 p1, P2 p2, P3 p3, P4 p4)
        {
            void *memory =::js_malloc (sizeof (T));

            return memory ? new (memory) T (p1, p2, p3, p4) : __null;
        }
    };
}

enum OptionKind {
    OptionKindBool, OptionKindString, OptionKindInt,
    OptionKindMultiString, OptionKindInvalid
};
struct Option {
    const char *longflag;
    const char *help;
    OptionKind kind;
    char shortflag;
    bool terminatesOptions;
    Option (OptionKind kind, char shortflag, const char *longflag,
            const char *help):longflag (longflag),
        help (help),
        kind (kind),
        shortflag (shortflag),
        terminatesOptions (false) {
    }
};
struct ValuedOption:public Option {
    const char *metavar;
    ValuedOption (OptionKind kind, char shortflag, const char *longflag,
                  const char *help, const char *metavar):Option (kind,
                              shortflag,
                              longflag,
                              help),
        metavar (metavar) {
    }
    virtual ~ ValuedOption () = 0;
};
struct StringOption:public ValuedOption {
    const char *value;
    StringOption (char shortflag, const char *longflag,
                  const char *help, const char *metavar)
      :ValuedOption (OptionKindString, shortflag, longflag,
          help, metavar), value (__null) { }
    virtual ~StringOption() {}
};
class OptionParser
{
    bool addStringOption (char shortflag, const char *longflag,
                          const char *help, const char *metavar);
};

bool
OptionParser::addStringOption (char shortflag, const char *longflag,
                               const char *metavar, const char *help)
{
    StringOption *so =
        OffTheBooks::new_ <StringOption> (shortflag, longflag, help, metavar);
}

With commit 5014df5d02d9d9 reverted:
 % c++ -shared -w -o /dev/null -fPIC -fno-rtti -pthread -pipe
-fprofile-generate -O0 test.ii
 %

With your patch:
 % c++ -shared -w -o /dev/null -fPIC -fno-rtti -pthread -pipe
-fprofile-generate -O0 test.ii
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZnwmPv' which may overflow at runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZN6OptionC2E10OptionKindcPKcS2_' which may overflow at runtime;
recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZN12ValuedOptionC2E10OptionKindcPKcS2_S2_' which may overflow at
runtime; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZN12StringOptionC2EcPKcS1_S1_' which may overflow at runtime;
recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZN12StringOptionD2Ev' which may overflow at runtime; recompile with
-fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
'__gcov0__ZN12StringOptionD0Ev' which may overflow at runtime; recompile with
-fPIC
collect2: error: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (6 preceding siblings ...)
  2011-11-15 10:09 ` markus at trippelsdorf dot de
@ 2011-11-15 20:28 ` nathan at acm dot org
  2011-11-15 22:15 ` nathan at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at acm dot org @ 2011-11-15 20:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #8 from Nathan Sidwell <nathan at acm dot org> 2011-11-15 20:12:33 UTC ---
On 11/15/11 10:03, markus at trippelsdorf dot de wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113
>

> With your patch:
>   % c++ -shared -w -o /dev/null -fPIC -fno-rtti -pthread -pipe
> -fprofile-generate -O0 test.ii
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/../../../../x86_64-pc-linux-gnu/bin/ld:
> error: /tmp/cciGbsuB.o: requires dynamic R_X86_64_PC32 reloc against
> '__gcov0__ZnwmPv' which may overflow at runtime; recompile with -fPIC

Ok, I think I understand what's going on here.  Here's a piece of code to
explain:

inline int *Foo ()
{
   static int x = 2;

   return &x;
}

int *(*Bar ()) ()
{
   return Foo;
}

although Foo::x is in the same comdat group as Foo, it is separately
overridable 
at load time by another shared object.  (of course such overriding completely 
breaks language semantics, but not ELF semantics).  The linker's adhering to
ELF 
semantics, and in this example the compiler emits:
    movq    _ZZ3FoovE1x@GOTPCREL(%rip), %rax
to get Foo::x's address.  In the gcov case, it's emitting:
    movq    __gcov0_js_malloc(%rip), %rax
to access the first counter value.  Although I think that's ok in a well-formed 
program, it's confusing the linker.  that's unfortunate. (If you compile the 
above example with -fprofile-generate you'll see different access sequences for 
_ZZ3FoovE1x and __gcov0__Z3Foov.)

I'm going to have to figure out why the right PIC sequence isn't being emitted.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (7 preceding siblings ...)
  2011-11-15 20:28 ` nathan at acm dot org
@ 2011-11-15 22:15 ` nathan at gcc dot gnu.org
  2011-11-20 10:13 ` nathan at gcc dot gnu.org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at gcc dot gnu.org @ 2011-11-15 22:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011-11-15
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (8 preceding siblings ...)
  2011-11-15 22:15 ` nathan at gcc dot gnu.org
@ 2011-11-20 10:13 ` nathan at gcc dot gnu.org
  2011-12-01 20:00 ` nathan at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at gcc dot gnu.org @ 2011-11-20 10:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #9 from Nathan Sidwell <nathan at gcc dot gnu.org> 2011-11-20 09:09:39 UTC ---
Author: nathan
Date: Sun Nov 20 09:09:34 2011
New Revision: 181524

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181524
Log:
    PR gcov-profile/51113
    * coverage.c (build_var): Propagate visibility for public decls.

    testsuite/
    * gcc.misc-tests/gcov-13.c: Check gcovpart-13b coverage
    * gcc.misc-tests/gcov-16.c: New.
    * gcc.misc-tests/gcov-17.c: New.
    * g++.dg/gcov/gcov-8.C: New.
    * g++.dg/gcov/gcov-9.C: New.
    * g++.dg/gcov/gcov-10.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/gcov/gcov-10.C
    trunk/gcc/testsuite/g++.dg/gcov/gcov-11.C
    trunk/gcc/testsuite/g++.dg/gcov/gcov-8.C
    trunk/gcc/testsuite/g++.dg/gcov/gcov-9.C
    trunk/gcc/testsuite/gcc.misc-tests/gcov-16.c
    trunk/gcc/testsuite/gcc.misc-tests/gcov-17.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/coverage.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.misc-tests/gcov-13.c


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (9 preceding siblings ...)
  2011-11-20 10:13 ` nathan at gcc dot gnu.org
@ 2011-12-01 20:00 ` nathan at gcc dot gnu.org
  2011-12-05 14:13 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at gcc dot gnu.org @ 2011-12-01 20:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #10 from Nathan Sidwell <nathan at gcc dot gnu.org> 2011-12-01 19:58:55 UTC ---
Author: nathan
Date: Thu Dec  1 19:58:51 2011
New Revision: 181892

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181892
Log:
    PR gcov-profile/51113
    * coverage.c (build_var): Keep coverage variables static.

    testsuite/
    * lib/gcov.exp (verify-lines): Add support for xfailing.
    (run-gcov): Likewise.
    * gcc.misc-tests/gcov-13.c: Xfail weak function.
    * gcc.misc-tests/gcov-16.c: Remove.
    * gcc.misc-tests/gcov-17.c: Remove.
    * g++.dg/gcov-8.C: Remove.
    * g++.dg/gcov-9.C: Remove.
    * g++.dg/gcovpart-12b.C: New.
    * g++.dg/gcov-12.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/gcov/gcov-12.C
    trunk/gcc/testsuite/g++.dg/gcov/gcovpart-12b.C
Removed:
    trunk/gcc/testsuite/g++.dg/gcov/gcov-8.C
    trunk/gcc/testsuite/g++.dg/gcov/gcov-9.C
    trunk/gcc/testsuite/gcc.misc-tests/gcov-16.c
    trunk/gcc/testsuite/gcc.misc-tests/gcov-17.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/coverage.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.misc-tests/gcov-13.c
    trunk/gcc/testsuite/lib/gcov.exp


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (10 preceding siblings ...)
  2011-12-01 20:00 ` nathan at gcc dot gnu.org
@ 2011-12-05 14:13 ` rguenth at gcc dot gnu.org
  2011-12-06  7:23 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-05 14:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (11 preceding siblings ...)
  2011-12-05 14:13 ` rguenth at gcc dot gnu.org
@ 2011-12-06  7:23 ` jakub at gcc dot gnu.org
  2011-12-06  7:26 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-06  7:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-06 07:22:24 UTC ---
Is this fixed now (i.e. can we close this)?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (12 preceding siblings ...)
  2011-12-06  7:23 ` jakub at gcc dot gnu.org
@ 2011-12-06  7:26 ` nathan at gcc dot gnu.org
  2011-12-06  8:32 ` jakub at gcc dot gnu.org
  2011-12-06  8:53 ` markus at trippelsdorf dot de
  15 siblings, 0 replies; 17+ messages in thread
From: nathan at gcc dot gnu.org @ 2011-12-06  7:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #12 from Nathan Sidwell <nathan at gcc dot gnu.org> 2011-12-06 07:25:47 UTC ---
Thanks for confirming.  I 'fixed' it by reverting part of the new feature set I
was implementing (hence the new xfail and removed testcases).  What's the
precedence here?  Should a new bug be opened for that reverted feature, should
I keep it in my head, or should this remain open?  I don't mind either way.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (13 preceding siblings ...)
  2011-12-06  7:26 ` nathan at gcc dot gnu.org
@ 2011-12-06  8:32 ` jakub at gcc dot gnu.org
  2011-12-06  8:53 ` markus at trippelsdorf dot de
  15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-06  8:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-06 08:32:02 UTC ---
This bug is about the regression that it caused, so if that regression is
fixed, this should be closed.  Whether you file a new bug (or is it enhancement
PR?) or keep it in your had is up to you I'd say, whatever you prefer.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug gcov-profile/51113] [4.7 regression] rev. 181105 causes Firefox profiledbuild failure
  2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
                   ` (14 preceding siblings ...)
  2011-12-06  8:32 ` jakub at gcc dot gnu.org
@ 2011-12-06  8:53 ` markus at trippelsdorf dot de
  15 siblings, 0 replies; 17+ messages in thread
From: markus at trippelsdorf dot de @ 2011-12-06  8:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51113

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #14 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-12-06 08:52:50 UTC ---
OK. Lets close this one then.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2011-12-06  8:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-12 23:36 [Bug gcov-profile/51113] New: [4.7 regression] rev. 181105 causes Firefox profiledbuild failure markus at trippelsdorf dot de
2011-11-13 11:31 ` [Bug gcov-profile/51113] " nathan at gcc dot gnu.org
2011-11-13 12:39 ` markus at trippelsdorf dot de
2011-11-13 14:00 ` markus at trippelsdorf dot de
2011-11-15  8:36 ` markus at trippelsdorf dot de
2011-11-15  9:02 ` markus at trippelsdorf dot de
2011-11-15  9:34 ` markus at trippelsdorf dot de
2011-11-15 10:09 ` markus at trippelsdorf dot de
2011-11-15 20:28 ` nathan at acm dot org
2011-11-15 22:15 ` nathan at gcc dot gnu.org
2011-11-20 10:13 ` nathan at gcc dot gnu.org
2011-12-01 20:00 ` nathan at gcc dot gnu.org
2011-12-05 14:13 ` rguenth at gcc dot gnu.org
2011-12-06  7:23 ` jakub at gcc dot gnu.org
2011-12-06  7:26 ` nathan at gcc dot gnu.org
2011-12-06  8:32 ` jakub at gcc dot gnu.org
2011-12-06  8:53 ` markus at trippelsdorf dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).