This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [trans-mem] PR 47952 Re: weak aliases, .tm_clone_table, and binutils confusion


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]