http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51698
Bug #: 51698
Summary: [trans-mem] TM runtime and application with LTO
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Created attachment 26198
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26198
testcase app-itm with lto
In my attempt to make _ITM_R/W* calls inlined into the application code, it
seems that the TM builtins and TM defintions don't work as expected with LTO.
$ gcc -flto -fgnu-tm -Wall -o bin appitm.c
`_ITM_beginTransaction' referenced in section `.text' of
/tmp/cc7uGSe1.ltrans0.ltrans.o: defined in discarded section `.text' of
/tmp/ccJk2crp.o (symbol from plugin)
`_ITM_RU4' referenced in section `.text' of /tmp/cc7uGSe1.ltrans0.ltrans.o:
defined in discarded section `.text' of /tmp/ccJk2crp.o (symbol from
plugin)
`_ITM_commitTransaction' referenced in section `.text' of
/tmp/cc7uGSe1.ltrans0.ltrans.o: defined in discarded section `.text' of
/tmp/ccJk2crp.o (symbol from plugin)
collect2: error: ld returned 1 exit status
I have merged all .c in the same source for the testcase but it has the same
problem if TM runtime is in a library.
Patrick Marlier.