This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion
- From: Patrick Marlier <patrick dot marlier at unine dot ch>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 8 Mar 2011 11:24:24 +0100
- Subject: Re: [trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion
- References: <4D712A21.3080400@redhat.com> <alpine.DEB.2.00.1103042006290.9242@localhost6.localdomain6> <4D714379.9040708@redhat.com> <alpine.DEB.2.00.1103061243310.28704@localhost6.localdomain6> <4D757D5F.8040800@redhat.com>
Hi Richard,
On 03/08/2011 01:50 AM, Richard Henderson wrote:
On 03/06/2011 10:54 PM, Patrick Marlier wrote:
Well, I have patched trans-mem.c to update the name of the COMDAT_GROUP in ipa_tm_create_version(). I know this is not the way to do this but I hope it can at least help you.
This part is clearly correct. I've tidied up your patch a bit and committed the
following. Please update the PR with a full compilable test case so I can
determine what else might need fixing.
I have just added a testcase to the PR but not reduced at all.
Actually the problem with your submitted patch is that the following
happens:
.section
.text._ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC2EPSt15_List_node_base,"axG",@progbits,_ZGTt67_ZNSt14_List_iteratorIN4Game12BuildProjectEEC5EPSt15_List_node_base,comdat
This is why my patch was *nasty* (string manipulation) because I can't
find a way to demangle it properly.
About this line of my patch for aliases:
DECL_WEAK (tm_alias) = DECL_WEAK (alias->decl);
You can reproduce it with the same testcase, looking at these symbols:
.weak _ZNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base
.globl
_ZGTtNSt14_List_iteratorIN4Game12BuildProjectEEC1EPSt15_List_node_base
The clone version should be also weak.
Patrick Marlier.