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/68881] [6 Regression] UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68881

--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #13)
> While GCC can do that, what if weakref is used in the source and the
> definition is provided by user in inline asm?

The assembly manual says:

7.102 '.weakref ALIAS, TARGET'
==============================

This directive creates an alias to the target symbol that enables the
symbol to be referenced with weak-symbol semantics, but without actually
making it weak.  If direct references or definitions of the symbol are
present, then the symbol will not be weak, but if all references to it 
are through weak references, the symbol will be marked as weak in the
symbol table.

   The effect is equivalent to moving all references to the alias to a
separate assembly source file, renaming the alias to the symbol in it,
declaring the symbol as weak there, and running a reloadable link to
merge the object files resulting from the assembly of the new source
file and the old source file that had the references to the alias
removed.

   The alias itself never makes to the symbol table, and is entirely
handled within the assembler.

It is unclear to me if TARGET could be a definition or not.

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