Be more strict on when we produce an undefined reference. In gas a file with
commit6751ca9f355fb9bccaf59961aa2e0618a7b003ff
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 29 Oct 2010 23:09:31 +0000 (29 23:09 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 29 Oct 2010 23:09:31 +0000 (29 23:09 +0000)
tree17afffb2eb0e14b45eb9436e6de44bfc48e1e6b5
parent6a6f3c43c577996468e6edf4ee474cf568a5f15c
Be more strict on when we produce an undefined reference. In gas a file with
just

.type   foo,@object

will produce an undefined reference to foo. On the other hand, a file with
just

.weakref bar, foo

will not. It is somewhat hard to support both in MC since both statements
should create the symbols. It should be possible if we really need to by
adding to the flags, but hopefully that is not necessary.

With this patch we do not produce a undefined reference in any of those cases.
The assembly file needs an actual use for the undefined reference to be
present.

This is in preparation for a patch implementing .weakref.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117735 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/ELFObjectWriter.cpp
test/MC/ELF/alias.s
test/MC/ELF/size.s
test/MC/ELF/undef.s