This is the mail archive of the gcc-bugs@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]

[Bug lto/49286] LTO incompatible with PIC and inline asm


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49286

--- Comment #1 from Jan Hubicka <hubicka at ucw dot cz> 2011-06-05 11:55:22 UTC ---
The problem is that GCC do not see that evil_long is used by the asm statement.
Static variables are renamed (in order to produce single .s file you can't have
two different statics with the same name) and then the problem is misdiagnozed
as external reference.

Make evil_long as output of the asm. I.e. something like
asm volatile ("mov %%rsp, $1"::"=m"(evil_long));

All variables accessed by asm statements in direct way (that is w/o the
constraints)
must be public and decorated with __attribute__ ((externally_visible))

Honza


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