[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #7 from danglin at gcc dot gnu dot org 2007-04-14 01:17 --- Subject: Bug 31322 Author: danglin Date: Sat Apr 14 01:17:41 2007 New Revision: 123806 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=123806 Log: PR middle-end/31322 * dwarf2out.c (output_call_frame_info): Call assemble_external_libcall when a personality function is used. Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #8 from danglin at gcc dot gnu dot org 2007-04-14 01:24 --- Fixed. -- danglin at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #6 from patchapp at dberlin dot org 2007-04-12 12:55 --- Subject: Bug number PR middle-end/31322 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00611.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #1 from sje at cup dot hp dot com 2007-04-06 16:59 --- I am seeing this on my HPPA build as well. David sent me a patch for it off-list and that patch fixed the build problem for me. -- sje at cup dot hp dot com changed: What|Removed |Added CC||sje at cup dot hp dot com Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-04-06 16:59:41 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca 2007-04-06 17:53 --- Subject: Re: [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0). I am seeing this on my HPPA build as well. David sent me a patch for it off-list and that patch fixed the build problem for me. The patch just reverts Mark's change. The previous code papers over the real problem. The reference to the __gxx_personality_v0 personality function occurs in the eh frame table and not in the exception table. Looking at this a bit, I think the fix is to add if (eh_personality_libfunc) assemble_external_libcall (eh_personality_libfunc); to output_call_frame_info in dwarf2out.c. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #3 from mark at codesourcery dot com 2007-04-06 22:09 --- Subject: Re: [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0). dave at hiauly1 dot hia dot nrc dot ca wrote: Looking at this a bit, I think the fix is to add if (eh_personality_libfunc) assemble_external_libcall (eh_personality_libfunc); to output_call_frame_info in dwarf2out.c. That makes sense to me. I think you could do it just in the for_eh/eh_personality case here: if (eh_personality_libfunc) { *p++ = 'P'; augmentation_size += 1 + size_of_encoded_value (per_encoding); } That would emit the reference only in situations where we're actually going to need the personality routine. The reason for my earlier change was that we were referencing it even when we'd optimized away all of the EH information in the module. I'm sorry this broke HP-UX; let me know if I can help. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2007-04-06 23:44 --- Subject: Re: [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0). That would emit the reference only in situations where we're actually going to need the personality routine. The reason for my earlier change was that we were referencing it even when we'd optimized away all of the EH information in the module. I'm sorry this broke HP-UX; let me know if I can help. I must admit I'm to blame for this ;( Importing functions that aren't used doesn't cause a problem on HP-UX, but I can see that it might cause the routine to be unnecessarily included in an executable on other systems. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
--- Comment #5 from mark at codesourcery dot com 2007-04-07 00:01 --- Subject: Re: [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0). dave at hiauly1 dot hia dot nrc dot ca wrote: --- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2007-04-06 23:44 --- Subject: Re: [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0). That would emit the reference only in situations where we're actually going to need the personality routine. The reason for my earlier change was that we were referencing it even when we'd optimized away all of the EH information in the module. I'm sorry this broke HP-UX; let me know if I can help. I must admit I'm to blame for this ;( Importing functions that aren't used doesn't cause a problem on HP-UX, but I can see that it might cause the routine to be unnecessarily included in an executable on other systems. Yes, the standard behavior for GNU as/ld on ELF systems is that a .globl emission in the .as file becomes an undefined symbol in the ELF object file, and the linker then pulls in files from an archive to satisfy that reference at link-time, even if there are no relocations against the symbol. One could reasonably argue that the linker shouldn't do this, but it does, and changing it might break things; people may well be relying on this trick. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322
[Bug middle-end/31322] [4.3 Regression] ld: Invalid symbol type for plabel (.libs/debug_list.o, __gxx_personality_v0).
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added Keywords||build Summary|ld: Invalid symbol type for |[4.3 Regression] ld: Invalid |plabel (.libs/debug_list.o, |symbol type for plabel |__gxx_personality_v0). |(.libs/debug_list.o, ||__gxx_personality_v0). Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31322