[trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion
Patrick Marlier
patrick.marlier@unine.ch
Tue Mar 8 10:26:00 GMT 2011
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.
More information about the Gcc-patches
mailing list