Open Quuxplusone opened 10 years ago
Bugzilla Link | PR17530 |
Status | NEW |
Importance | P normal |
Reported by | Reid Kleckner (rnk@google.com) |
Reported on | 2013-10-09 19:32:31 -0700 |
Last modified on | 2018-03-19 16:56:52 -0700 |
Version | trunk |
Hardware | PC Windows NT |
CC | artem.tamazov@amd.com, david.majnemer@gmail.com, llvm-bugs@lists.llvm.org, peter@pcc.me.uk, rafael@espindo.la, ruiu@google.com |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
"If a definition of sym1 is linked, then an external reference to the symbol is resolved normally. If a definition of sym1 is not linked, then all references to the weak external for sym1 refer to sym2 instead. The external symbol, sym2, must always be linked; typically, it is defined in the module that contains the weak reference to sym1."
Yep, sounds like we are violating that last sentence.
Woops, I meant destroy arguments left to right. We push cleanups left to right, which means we pop them right to left, which is wrong. Blech.
Woops, I meant destroy arguments left to right. We push cleanups left to
right, which means we pop them right to left, which is wrong. Blech.(In reply
to comment #2)
> Woops, I meant destroy arguments left to right. We push cleanups left to
> right, which means we pop them right to left, which is wrong. Blech.
Arg, that should've been on PR18035 obviously.
On ELF we implement aliases by just having another symbol pointing to the same
position in the file.
This has its own set of issues:
* Linkonce{_odr} aliases to weak symbols are very dangerous as it can lead to
comdats with different contents in different TUs.
* Aliases passing by a weak alias cannot be implemented properly, as the linker
will not resolve them with the same semantics as llvm. For example, given
@my_alias = alias linkonce_odr void ()* @my_func
@my_alias2 = alias void ()* @my_alias
define void @my_func() {
ret void
}
my_alias2 will always point to the my_func, even if we link with a file with a
strong symbol for my_alias.
I intended to just rejects this cases in the backend. Would the same
implementation and restrictions work for COFF?